Skip to content

Commit

Permalink
add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
v923z committed Oct 5, 2024
1 parent 564cf37 commit 82f74ac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/2d/numpy/take.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 82f74ac

Please sign in to comment.