def svd(a, driver:'svd', job:'A')
    unless /^[ASN]/i =~ job
      raise ArgumentError, "invalid job: #{job.inspect}"
    end
    case driver.to_s
    when /^(ge)?sdd$/i, "turbo"
      Lapack.call(:gesdd, a, jobz:job)[0..2]
    when /^(ge)?svd$/i
      Lapack.call(:gesvd, a, jobu:job, jobvt:job)[0..2]
    else
      raise ArgumentError, "invalid driver: #{driver}"
    end
  end
def svd(a, driver:'svd', job:'A')
    unless /^[ASN]/i =~ job
      raise ArgumentError, "invalid job: #{job.inspect}"
    end
    case driver.to_s
    when /^(ge)?sdd$/i, "turbo"
      Lapack.call(:gesdd, a, jobz:job)[0..2]
    when /^(ge)?svd$/i
      Lapack.call(:gesvd, a, jobu:job, jobvt:job)[0..2]
    else
      raise ArgumentError, "invalid driver: #{driver}"
    end
  end
Computes the Singular Value Decomposition (SVD) of a M-by-N matrix A,
 and the left and/or right singular vectors.  The SVD is written

     A = U * SIGMA * transpose(V)

 where SIGMA is an M-by-N matrix which is zero except for its
 min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
 V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
 are the singular values of A; they are real and non-negative, and
 are returned in descending order. The first min(m,n) columns of U
 and V are the left and right singular vectors of A. Note that the
 routine returns V**T, not V.

 @param a [Numo::NArray] m-by-n matrix A (>= 2-dimensinal NArray)
 @param driver [String or Symbol] choose LAPACK solver from 'svd',
   'sdd'. (optional, default='svd')
 @param job [String or Symbol]
   - 'A': all M columns of U and all N rows of V\*\*T are returned in
     the arrays U and VT.
   - 'S': the first min(M,N) columns of U and the first min(M,N)
     rows of V\*\*T are returned in the arrays U and VT.
   - 'N':  no columns of U or rows of V\*\*T are computed.
 @return [[sigma,u,vt]] SVD result. Array<Numo::NArray>