--------
>>> v = matrix([1,1])
- >>> print('{:.5f}'.format(norm(v)))
- 1.41421
+ >>> norm(v)
+ 1.414...
>>> A = matrix([1,1,1,1], (2,2))
>>> norm(A)
- 2.0
+ 2.0...
"""
return sqrt(inner_product(matrix_or_vector, matrix_or_vector))
Examples
--------
- >>> condition_number(identity(1, typecode='d'))
- 1.0
- >>> condition_number(identity(2, typecode='d'))
- 1.0
>>> condition_number(identity(3, typecode='d'))
1.0