IndexError on ellipsis + slice
Issue #28
resolved
Numpy:
>>> import numpy as np
>>> n = 2
>>> a = np.empty((2, n*6), dtype=np.float32)
>>> a[..., n*3:n*6]
array([[ 8.40779079e-45, 0.00000000e+00, 0.00000000e+00,
1.26116862e-44, 0.00000000e+00, 0.00000000e+00],
[ 0.00000000e+00, 2.66246708e-44, 0.00000000e+00,
0.00000000e+00, 3.08285662e-44, 0.00000000e+00]], dtype=float32)
>>>
Numpypy: (450881e, with Pypy 2.6.0-2 from Debian)
>>>> import numpy as np
>>>> n = 2
>>>> a = np.empty((2, n*6), dtype=np.float32)
>>>> a[..., n*3:n*6]
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
>>>>
Comments (2)
-
-
- changed status to resolved
This has just been fixed in PyPy
default
. - Log in to comment
Yes, we know about this. Note that it needs to be fixed inside the builtin
_numpypy
module - i.e. in the main PyPy repository.