def eigh(a, b=nil, vals_only:false, vals_range:nil, uplo:'U', turbo:false)
    jobz = vals_only ? 'N' : 'V' # jobz: Compute eigenvalues and eigenvectors.
    b = a.class.eye(a.shape[0]) if b.nil?
    func = blas_char(a, b) =~ /c|z/ ? 'hegv' : 'sygv'
    if vals_range.nil?
      func << 'd' if turbo
      v, u_, w, = Lapack.call(func.to_sym, a, b, uplo: uplo, jobz: jobz)
      v = nil if vals_only
      [w, v]
    else
      func << 'x'
      il = vals_range.first(1)[0]
      iu = vals_range.last(1)[0]
      a_, b_, w, v, = Lapack.call(func.to_sym, a, b, uplo: uplo, jobz: jobz, range: 'I', il: il + 1, iu: iu + 1)
      v = nil if vals_only
      [w, v]
    end
  end
def eigh(a, b=nil, vals_only:false, vals_range:nil, uplo:'U', turbo:false)
    jobz = vals_only ? 'N' : 'V' # jobz: Compute eigenvalues and eigenvectors.
    b = a.class.eye(a.shape[0]) if b.nil?
    func = blas_char(a, b) =~ /c|z/ ? 'hegv' : 'sygv'
    if vals_range.nil?
      func << 'd' if turbo
      v, u_, w, = Lapack.call(func.to_sym, a, b, uplo: uplo, jobz: jobz)
      v = nil if vals_only
      [w, v]
    else
      func << 'x'
      il = vals_range.first(1)[0]
      iu = vals_range.last(1)[0]
      a_, b_, w, v, = Lapack.call(func.to_sym, a, b, uplo: uplo, jobz: jobz, range: 'I', il: il + 1, iu: iu + 1)
      v = nil if vals_only
      [w, v]
    end
  end
Obtains the eigenvalues and, optionally, the eigenvectors
 by solving an ordinary or generalized eigenvalue problem
 for a square symmetric / Hermitian matrix.

 @param a [Numo::NArray] square symmetric matrix (>= 2-dimensinal NArray)
 @param b [Numo::NArray] (optional) square symmetric matrix (>= 2-dimensinal NArray)
   If nil, identity matrix is assumed.
 @param vals_only [Bool] (optional) If false, eigenvectors are computed.
 @param vals_range [Range] (optional)
   The range of indices of the eigenvalues (in ascending order) and corresponding eigenvectors to be returned.
   If nil or 0...N (N is the size of the matrix a), all eigenvalues and eigenvectors are returned.
 @param uplo [String or Symbol] (optional, default='U')
   Access upper ('U') or lower ('L') triangle.
 @param turbo [Bool] (optional) If true, divide and conquer algorithm is used.
 @return [[w,v]]
   - **w** [Numo::NArray] -- The eigenvalues.
   - **v** [Numo::NArray] -- The eigenvectors if vals_only is false, otherwise nil.