diff --git a/tests/2d/numpy/take.py b/tests/2d/numpy/take.py index 06c5719d..5f72f977 100644 --- a/tests/2d/numpy/take.py +++ b/tests/2d/numpy/take.py @@ -10,6 +10,16 @@ a = np.array(range(12), dtype=dtype).reshape((3, 4)) print(np.take(a, (0, 10))) +print('1D arrays') +for dtype in dtypes: + a = np.array(range(12), dtype=dtype) + print('\na:', a) + indices = (0, 2, 2, 1) + print(np.take(a, indices)) + indices = np.array([0, 2, 2, 1], dtype=np.uint8) + print(np.take(a, indices)) + + for dtype in dtypes: a = np.array(range(12), dtype=dtype).reshape((3, 4)) print('\na:', a)