summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarren Weckesser <warren.weckesser@gmail.com>2013-07-19 21:09:45 -0400
committerWarren Weckesser <warren.weckesser@gmail.com>2013-07-19 21:09:45 -0400
commitffb45c5f107795752a55976b185ed50784aed744 (patch)
treebc15646bbbd813d26a37f7fc8b1cc3906d1c65ad
parentc5694c5188c76701eed47c0736ee9c285f47d07d (diff)
downloadnumpy-ffb45c5f107795752a55976b185ed50784aed744.tar.gz
BUG: linalg: norm was computing and then ignoring a product
-rw-r--r--numpy/linalg/linalg.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py
index 4c4e51748..53b505756 100644
--- a/numpy/linalg/linalg.py
+++ b/numpy/linalg/linalg.py
@@ -2029,8 +2029,7 @@ def norm(x, ord=None, axis=None):
# Check the default case first and handle it immediately.
if ord is None and axis is None:
- s = (x.conj() * x).real
- return sqrt(add.reduce((x.conj() * x).ravel().real))
+ return sqrt(add.reduce((x.conj() * x).real, axis=None))
# Normalize the `axis` argument to a tuple.
if axis is None: