cr.nimble.row_space

cr.nimble.row_space(A, rcond=None)[source]

Constructs an orthonormal basis for the row space of A using SVD

Parameters
  • A (jax.numpy.ndarray) – Input matrix of size (M, N) where M is the dimension of the ambient vector space and N is the number of vectors in A

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

Returns

Returns a tuple consisting of
  • the right singular vectors of A

  • the effective rank of A

Return type

(jax.numpy.ndarray, int)

To get the ONB for the row space, follow the two step process:

Q, r = orth(A)
Q = Q[:, :r]

Examples

>>> A = jnp.array([[2, 0, 0], [0, 5, 0]]).T
>>> print(A)
[[2 0]
[0 5]
[0 0]]
>>> Q, rank = crla.row_space(A)
>>> print(Q[:, :rank])
[[0. 1.]
[1. 0.]]