numpy.linalg.svdvals#
- linalg.svdvals(x, /)[source]#
Returns the singular values of a matrix (or a stack of matrices)
x
. When x is a stack of matrices, the function will compute the singular values for each matrix in the stack.This function is Array API compatible.
Calling
np.svdvals(x)
to get singular values is the same asnp.svd(x, compute_uv=False, hermitian=False)
.- Parameters:
- x(…, M, N) array_like
Input array having shape (…, M, N) and whose last two dimensions form matrices on which to perform singular value decomposition. Should have a floating-point data type.
- Returns:
- outndarray
An array with shape (…, K) that contains the vector(s) of singular values of length K, where K = min(M, N).
See also
scipy.linalg.svdvals
Compute singular values of a matrix.