Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[testing] Use tuples for numpy indexing (#14476)
Some versions of numpy disallow the following: >>> import numpy as np >>> a = np.zeros(10) >>> b = [slice(None)] >>> a[b] Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices When b is a tuple, it works fine: >>> a[tuple(b)] array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
- Loading branch information