def orth(a, rcond: -1)
    raise NArray::ShapeError, '2-d array is required' if a.ndim < 2
    s, u, = svd(a)
    tol = s.max * (rcond.nil? || rcond < 0 ? a.class::EPSILON * a.shape.max : rcond)
    k = (s > tol).count
    u[true, 0...k]
  end
def orth(a, rcond: -1)
    raise NArray::ShapeError, '2-d array is required' if a.ndim < 2
    s, u, = svd(a)
    tol = s.max * (rcond.nil? || rcond < 0 ? a.class::EPSILON * a.shape.max : rcond)
    k = (s > tol).count
    u[true, 0...k]
  end
Computes an orthonormal basis for the range of matrix A.

 @param a [Numo::NArray] m-by-n matrix A (>= 2-dimensional NArray).
 @param rcond [Float] (optional)
   rcond is used to determine the effective rank of A.
   Singular values `s[i] <= rcond * s.max` are treated as zero.
   If rcond < 0, machine precision is used instead.
 @return [Numo::NArray] The orthonormal basis for the range of matrix A.