Partial indexing by boolean array fails

Issue #46 resolved
Davidr Foe created an issue

###CPython

>>> x = np.arange(4).reshape(2,2)
>>> x[np.array([True, False]), :]
array([[0, 1]])

###PyPy 4.0.1

>>> x = np.arange(4).reshape(2,2)
>>> x[np.array([True, False]), :]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: expected integer, got numpy.bool_ object

When boolean arrays are given for both axis, the indexing works just fine.

Comments (2)

  1. Log in to comment