summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2007-04-30 08:53:00 +0000
committerStefan van der Walt <stefan@sun.ac.za>2007-04-30 08:53:00 +0000
commit5eefd7aa5faaa9efb58ae92158d6364616b58f2b (patch)
tree737e81f69d8df037922b088615479a1648d64acc
parent4e442decf1b344458fe7ba68b58f1c3de8ca7590 (diff)
downloadnumpy-5eefd7aa5faaa9efb58ae92158d6364616b58f2b.tar.gz
Add regression test. Fix order of arguments in test_multiarray.
-rw-r--r--numpy/core/tests/test_multiarray.py2
-rw-r--r--numpy/core/tests/test_regression.py8
2 files changed, 9 insertions, 1 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 97aa13a65..4ec8501c7 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -380,7 +380,7 @@ class test_clip(NumpyTestCase):
byteorder = '='
if x.dtype.byteorder == '|': byteorder = '|'
- assert_equal(byteorder,x.dtype.byteorder)
+ assert_equal(x.dtype.byteorder,byteorder)
self._check_range(x,expected_min,expected_max)
return x
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 14708fcc5..6c69b042b 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -645,5 +645,13 @@ class test_regression(NumpyTestCase):
r = N.array([['abc']], dtype=[('var1', '|S20')])
assert str(r['var1'][0][0]) == 'abc'
+ def check_take_output(self, level=rlevel):
+ """Ensure that 'take' honours output parameter."""
+ x = N.arange(12).reshape((3,4))
+ a = N.take(x,[0,2],axis=1)
+ b = N.zeros_like(a)
+ N.take(x,[0,2],axis=1,out=b)
+ assert_array_equal(a,b)
+
if __name__ == "__main__":
NumpyTest().run()