diff options
| author | mattip <matti.picus@gmail.com> | 2019-10-30 10:54:51 +0200 |
|---|---|---|
| committer | mattip <matti.picus@gmail.com> | 2019-10-30 10:54:51 +0200 |
| commit | 5c778954cc801fd2272fa6aeb89b85868aa25899 (patch) | |
| tree | 04424c7de5ce68c0e480924418511eb1c36861a1 /numpy/linalg/tests | |
| parent | 647ea1908cc33eb2f9fb6c5828cfb895f8663cc0 (diff) | |
| download | numpy-5c778954cc801fd2272fa6aeb89b85868aa25899.tar.gz | |
ENH: add OO->? loops, use np.compare(a, b, dtype=bool), add comments
Diffstat (limited to 'numpy/linalg/tests')
| -rw-r--r-- | numpy/linalg/tests/test_regression.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
