summaryrefslogtreecommitdiff
path: root/numpy/testing/tests
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-04-07 23:59:17 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-04-07 23:59:17 +0000
commit7e107ac18375868d8a430329c9d1237b4aaa684e (patch)
tree673b3dcbb0805ab8968a651bc7a4008d25a5b616 /numpy/testing/tests
parentca295deafe01d224fd1f03dc60b2af182c3c6fe1 (diff)
downloadnumpy-7e107ac18375868d8a430329c9d1237b4aaa684e.tar.gz
assert* funcs: Add generic test for rank 3 arrays.
Diffstat (limited to 'numpy/testing/tests')
-rw-r--r--numpy/testing/tests/test_utils.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index 5a50a5c72..4688f4955 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -95,3 +95,22 @@ class TestEqual:
# Test strings
for t in ['S1', 'U1']:
foo(t)
+
+ def test_generic_rank3(self):
+ """Test rank 3 array for all dtypes."""
+ def foo(t):
+ a = N.empty((4, 2, 3), t)
+ a.fill(1)
+ b = a.copy()
+ c = a.copy()
+ c.fill(0)
+ self._test_equal(a, b)
+ self._test_not_equal(c, b)
+
+ # Test numeric types and object
+ for t in '?bhilqpBHILQPfdgFDG':
+ foo(t)
+
+ # Test strings
+ for t in ['S1', 'U1']:
+ foo(t)