summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-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()