summaryrefslogtreecommitdiff
path: root/numpy/testing/tests/test_utils.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-04-08 18:04:33 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-04-08 18:04:33 +0000
commit2ba8132b518e08c6b25e54df0a025cf9aa006f06 (patch)
treea1466fea8cf1635ac4ffd8311050f6d9f4c625cb /numpy/testing/tests/test_utils.py
parent0035f9187945a7d787bcadad38cfb84ca196bc18 (diff)
downloadnumpy-2ba8132b518e08c6b25e54df0a025cf9aa006f06.tar.gz
Fix test for assert* with nan values + string formatting issue when handling nan.
Diffstat (limited to 'numpy/testing/tests/test_utils.py')
-rw-r--r--numpy/testing/tests/test_utils.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index 154c3f03e..48cd89cdd 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -90,11 +90,14 @@ class TestEqual(_GenericTest):
foo(t)
def test_nan_array(self):
- """Test two arrays with different shapes are found not equal."""
- a = N.array([1, 2])
- b = N.array([[1, 2], [1, 2]])
+ """Test arrays with nan values in them."""
+ a = N.array([1, 2, N.nan])
+ b = N.array([1, 2, N.nan])
- self._test_not_equal(a, b)
+ self._test_equal(a, b)
+
+ c = N.array([1, 2, 3])
+ self._test_not_equal(c, b)
def test_string_arrays(self):
"""Test two arrays with different shapes are found not equal."""