dask.array.linalg.svd

dask.array.linalg.svd(a, coerce_signs=True)[source]

Compute the singular value decomposition of a matrix.

Parameters
a(M, N) Array
coerce_signsbool

Whether or not to apply sign coercion to singular vectors in order to maintain deterministic results, by default True.

Returns
u(M, K) Array, unitary / orthogonal

Left-singular vectors of a (in columns) with shape (M, K) where K = min(M, N).

s(K,) Array, singular values in decreasing order (largest first)

Singular values of a.

v(K, N) Array, unitary / orthogonal

Right-singular vectors of a (in rows) with shape (K, N) where K = min(M, N).

Warning

SVD is only supported for arrays with chunking in one dimension. This requires that all inputs either contain a single column of chunks (tall-and-skinny) or a single row of chunks (short-and-fat). For arrays with chunking in both dimensions, see da.linalg.svd_compressed.

See also

np.linalg.svd

Equivalent NumPy Operation

da.linalg.svd_compressed

Randomized SVD for fully chunked arrays

dask.array.linalg.tsqr

QR factorization for tall-and-skinny arrays

dask.array.utils.svd_flip

Sign normalization for singular vectors

Examples

>>> u, s, v = da.linalg.svd(x)