diagonal matrix
Say it “diag of v”
A square matrix with v along the diagonal and zeros elsewhere (or the reverse: pull out a matrix's diagonal).
Example
In code
np.diag(v)torch.diag(v)Where you’ll see it in ML
Diagonal covariances, per-feature scaling, SVD's Σ.