From 5c778954cc801fd2272fa6aeb89b85868aa25899 Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 30 Oct 2019 10:54:51 +0200 Subject: ENH: add OO->? loops, use np.compare(a, b, dtype=bool), add comments --- numpy/linalg/tests/test_regression.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/linalg') diff --git a/numpy/linalg/tests/test_regression.py b/numpy/linalg/tests/test_regression.py index 5f5c594cf..289566109 100644 --- a/numpy/linalg/tests/test_regression.py +++ b/numpy/linalg/tests/test_regression.py @@ -109,9 +109,9 @@ class TestRegression(object): assert_raises(ValueError, linalg.norm, testvector, ord='nuc') assert_raises(ValueError, linalg.norm, testvector, ord=np.inf) assert_raises(ValueError, linalg.norm, testvector, ord=-np.inf) - # Succeeds, but returns boolean? + # Succeeds, equivalent to "sum(x != 0)" r = linalg.norm(testvector, ord=0) - assert_(r.dtype == np.type('float64')) + assert_(r.dtype == 'bool') assert_raises(ValueError, linalg.norm, testvector, ord=-1) assert_raises(ValueError, linalg.norm, testvector, ord=-2) -- cgit v1.2.1