diff options
author | John Kirkham <kirkhamj@janelia.hhmi.org> | 2016-01-22 17:35:42 -0500 |
---|---|---|
committer | John Kirkham <kirkhamj@janelia.hhmi.org> | 2016-01-22 18:15:44 -0500 |
commit | 75d5b59bca181ee7e5ba872999014006c4b6c3f3 (patch) | |
tree | a63f92ebed409e2ad084642d1ad1f1fba9441a79 | |
parent | 43c6a89128347928c5fe26f67ba2a0a022f00822 (diff) | |
download | numpy-75d5b59bca181ee7e5ba872999014006c4b6c3f3.tar.gz |
DOC: Update `norm` docstring to include examples that reflect that all computations are done with floating point numbers.
-rw-r--r-- | numpy/linalg/linalg.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index f333bde47..9d486d2a5 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -2060,22 +2060,22 @@ def norm(x, ord=None, axis=None, keepdims=False): >>> LA.norm(b, 'fro') 7.745966692414834 >>> LA.norm(a, np.inf) - 4 + 4.0 >>> LA.norm(b, np.inf) - 9 + 9.0 >>> LA.norm(a, -np.inf) - 0 + 0.0 >>> LA.norm(b, -np.inf) - 2 + 2.0 >>> LA.norm(a, 1) - 20 + 20.0 >>> LA.norm(b, 1) - 7 + 7.0 >>> LA.norm(a, -1) -4.6566128774142013e-010 >>> LA.norm(b, -1) - 6 + 6.0 >>> LA.norm(a, 2) 7.745966692414834 >>> LA.norm(b, 2) @@ -2099,7 +2099,7 @@ def norm(x, ord=None, axis=None, keepdims=False): >>> LA.norm(c, axis=1) array([ 3.74165739, 4.24264069]) >>> LA.norm(c, ord=1, axis=1) - array([6, 6]) + array([ 6., 6.]) Using the `axis` argument to compute matrix norms: |