summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_arraysetops.py
diff options
context:
space:
mode:
authorRedRuM <44142765+zoj613@users.noreply.github.com>2019-11-03 19:53:08 +0200
committerRedRuM <44142765+zoj613@users.noreply.github.com>2019-11-03 19:53:08 +0200
commit87840dc2f09ebeed12c3b9fef68b94dc04f4d16f (patch)
treef746eeaa31cb757de6ee7cb5253c6ae4c0b4218c /numpy/lib/tests/test_arraysetops.py
parent0117379f1c751296c914ffe9547a84380219b588 (diff)
parent2be03c8d25b14b654064e953feac7d210e6bd44d (diff)
downloadnumpy-87840dc2f09ebeed12c3b9fef68b94dc04f4d16f.tar.gz
merge latest changes on master branch
Diffstat (limited to 'numpy/lib/tests/test_arraysetops.py')
-rw-r--r--numpy/lib/tests/test_arraysetops.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py
index dd8a38248..fd21a7f76 100644
--- a/numpy/lib/tests/test_arraysetops.py
+++ b/numpy/lib/tests/test_arraysetops.py
@@ -600,8 +600,11 @@ class TestUnique(object):
assert_array_equal(unique(data, axis=1), result.astype(dtype), msg)
msg = 'Unique with 3d array and axis=2 failed'
- data3d = np.dstack([data] * 3)
- result = data3d[..., :1]
+ data3d = np.array([[[1, 1],
+ [1, 0]],
+ [[0, 1],
+ [0, 0]]]).astype(dtype)
+ result = np.take(data3d, [1, 0], axis=2)
assert_array_equal(unique(data3d, axis=2), result, msg)
uniq, idx, inv, cnt = unique(data, axis=0, return_index=True,