-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
For example:
>>> Tuple(..., 0, 0).reduce((0, 0))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/aaronmeurer/Documents/ndindex/ndindex/tuple.py", line 367, in reduce
s = s.reduce(shape, axis=axis, negative_int=negative_int)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/aaronmeurer/Documents/ndindex/ndindex/integer.py", line 100, in reduce
self._raise_indexerror(shape, axis)
File "/Users/aaronmeurer/Documents/ndindex/ndindex/integer.py", line 63, in _raise_indexerror
raise IndexError(f"index {self.raw} is out of bounds for axis {axis} with size {size}")
IndexError: index 0 is out of bounds for axis 1 with size 0vs.
>>> np.empty((0, 0))[..., 0, 0]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: index 0 is out of bounds for axis 0 with size 0
This means we have to set same_exception=False all over the tests.
It's because of the reverse loop
Line 337 in bdb7edb
| for i, s in enumerate(reversed(args[:ellipsis_i]), start=1): |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels