This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / linalg / _decomp_svd / orth

function

scipy.linalg._decomp_svd:orth

source: build-install/usr/lib/python3.14/site-packages/scipy/linalg/_decomp_svd.py:362

Signature

def orth(A, rcond = None)

Summary

Construct an orthonormal basis for the range of A using SVD.

Extended Summary

The documentation is written assuming array arguments are of specified "core" shapes. However, array argument(s) of this function may have additional "batch" dimensions prepended to the core shape. In this case, the array is treated as a batch of lower-dimensional slices; see linalg_batch for details. The NEP 5 signature of this function is (i,j)->(i,j).

Parameters

A : (M, N) array_like

Input array

rcond : float, optional

Relative condition number. Singular values s smaller than rcond * max(s) are considered zero. Default: floating point eps * max(M,N).

Returns

Q : (M, K) ndarray

Orthonormal basis for the range of A. K = effective rank of A, as determined by rcond

Examples

import numpy as np
from scipy.linalg import orth
A = np.array([[2, 0, 0], [0, 5, 0]])  # rank 2 array
orth(A)
orth(A.T)
✓
array([[0., 1.],
       [1., 0.],
       [0., 0.]])

See also

null_space

Matrix null space

svd

Singular value decomposition of a matrix

Aliases

  • scipy.linalg.orth

Referenced by