def cond(a,ord=nil)
    if ord.nil?
      s = svdvals(a)
      s[false, 0]/s[false, -1]
    else
      norm(a, ord, axis:[-2,-1]) * norm(inv(a), ord, axis:[-2,-1])
    end
  end
def cond(a,ord=nil)
    if ord.nil?
      s = svdvals(a)
      s[false, 0]/s[false, -1]
    else
      norm(a, ord, axis:[-2,-1]) * norm(inv(a), ord, axis:[-2,-1])
    end
  end
Compute the condition number of a matrix
 using the norm with one of the following order.

     |  ord  |  matrix norm           |
     | ----- | ---------------------- |
     |  nil  | 2-norm using SVD       |
     | 'fro' | Frobenius norm         |
     | 'inf' | x.abs.sum(axis:-1).max |
     |    1  | x.abs.sum(axis:-2).max |
     |    2  | 2-norm (max sing_vals) |

 @param a [Numo::NArray] matrix or vector (>= 1-dimensinal NArray)
 @param ord [String or Symbol] Order of the norm.
 @return [Numo::NArray] cond result
 @example
     a = Numo::DFloat[[1, 0, -1], [0, 1, 0], [1, 0, 1]]
     => Numo::DFloat#shape=[3,3]
     [[1, 0, -1],
      [0, 1, 0],
      [1, 0, 1]]
     LA = Numo::Linalg
     LA.cond(a)
     => 1.4142135623730951
     LA.cond(a, 'fro')
     => 3.1622776601683795
     LA.cond(a, 'inf')
     => 2.0
     LA.cond(a, '-inf')
     => 1.0
     LA.cond(a, 1)
     => 2.0
     LA.cond(a, -1)
     => 1.0
     LA.cond(a, 2)
     => 1.4142135623730951
     LA.cond(a, -2)
     => 0.7071067811865475
     (LA.svdvals(a)).min*(LA.svdvals(LA.inv(a))).min
     => 0.7071067811865475