- edited description
Partial indexing by boolean array fails
Issue #46
resolved
###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)
-
reporter -
- changed status to resolved
fixed in pypy d77888929462
- Log in to comment