diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-04-03 16:01:47 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-04-03 16:01:47 +0200 |
commit | 7497d609228dd3ae0ad8b76ba712031c1b4712d8 (patch) | |
tree | 35650b38f2c895fe80a1498ac1e91cb81b424738 /numpy/core/numeric.py | |
parent | f944e32ff172250045f3ca6f819bd96fbd3c6ebc (diff) | |
download | numpy-7497d609228dd3ae0ad8b76ba712031c1b4712d8.tar.gz |
BUG: fix allclose to work for scalar inf. Also actually runs tests.
Tests were not run before because the allclose test class was a subclass of
TestCase and used generators. This is not supported by nose, tests will be
skipped.
Also changes plain asserts to assert_().
Closes #1672. Thanks to Justin Peel for the allclose inf fix.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index e36f196c1..2dace5de1 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1911,8 +1911,8 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8): False """ - x = array(a, copy=False) - y = array(b, copy=False) + x = array(a, copy=False, ndmin=1) + y = array(b, copy=False, ndmin=1) xinf = isinf(x) if not all(xinf == isinf(y)): return False |