def solve(a, b, driver:"gen", uplo:'U')
    case driver.to_s
    when /^gen?(sv)?$/i
      # returns lu, x, ipiv, info
      Lapack.call(:gesv, a, b)[1]
    when /^(sym?|her?|pos?)(sv)?$/i
      func = driver[0..1].downcase+"sv"
      Lapack.call(func, a, b, uplo:uplo)[1]
    else
      raise ArgumentError, "invalid driver: #{driver}"
    end
  end
def solve(a, b, driver:"gen", uplo:'U')
    case driver.to_s
    when /^gen?(sv)?$/i
      # returns lu, x, ipiv, info
      Lapack.call(:gesv, a, b)[1]
    when /^(sym?|her?|pos?)(sv)?$/i
      func = driver[0..1].downcase+"sv"
      Lapack.call(func, a, b, uplo:uplo)[1]
    else
      raise ArgumentError, "invalid driver: #{driver}"
    end
  end
Solving equations and inverting matrices
 Solves linear equation `a * x = b` for `x`
 from square matrix `a`
 @param a [Numo::NArray] n-by-n square matrix  (>= 2-dimensinal NArray)
 @param b [Numo::NArray] n-by-nrhs right-hand-side matrix (>=
  1-dimensinal NArray)
 @param driver [String or Symbol] choose LAPACK diriver from
   'gen','sym','her' or 'pos'. (optional, default='gen')
 @param uplo [String or Symbol] optional, default='U'. Access upper
   or ('U') lower ('L') triangle. (omitted when driver:"gen")
 @return [Numo::NArray] The solusion matrix/vector X.