scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
diagsvd(s, M, N)

Parameters

s : (M,) or (N,) array_like

Singular values

M : int

Size of the matrix whose singular values are s.

N : int

Size of the matrix whose singular values are s.

Returns

S : (M, N) ndarray

The S-matrix in the singular value decomposition

Construct the sigma matrix in SVD from singular values and size M, N.

See Also

svd

Singular value decomposition of a matrix

svdvals

Compute singular values of a matrix.

Examples

>>> from scipy.linalg import diagsvd
... vals = np.array([1, 2, 3]) # The array representing the computed svd
... diagsvd(vals, 3, 4) array([[1, 0, 0, 0], [0, 2, 0, 0], [0, 0, 3, 0]])
>>> diagsvd(vals, 4, 3)
array([[1, 0, 0],
       [0, 2, 0],
       [0, 0, 3],
       [0, 0, 0]])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.linalg._decomp_svd.svdvals scipy.linalg._decomp_svd.svd scipy.linalg._decomp_svd.diagsvd

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/linalg/_decomp_svd.py#233
type: <class 'function'>
Commit: