2d np.array does not allow indexing by single np.int32

Issue #36 resolved
Konstantin Lopukhin created an issue

CPython:

>>> x = np.zeros((2, 3))
>>> x[0]
array([ 0.,  0.,  0.])
>>> x[np.int32(0)]
array([ 0.,  0.,  0.])
>>> 

PyPy 2.6.0:

>>>> x = np.zeros((2, 3))
>>>> x[0]
array([ 0.,  0.,  0.])
>>>> x[np.int32(0)]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'numpy.int32' object is not iterable

Comments (1)

  1. Log in to comment