1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
Description: Fix for issue with test related to indices.
Patch to fix the indices to dtype 'int32' before passing them to
check result.
Author: Pulak Bhushan <pulakbhushan@gmail.com>
Last-Update: 2024-02-23
--- a/tests/test_autoray.py
+++ b/tests/test_autoray.py
@@ -513,6 +513,9 @@ def test_take(backend):
ind = gen_rand((num_inds,), "numpy", dtype="int64")
else:
ind = gen_rand((num_inds,), backend, dtype="int64")
+
+ # Ensure indices are of dtype 'int32'
+ ind = ind.astype('int32')
# Take along axis 1, and check if result makes sense
B = ar.do("take", A, ind, axis=1)
|