[pypy-issue] [issue1118] numpypy: indexing of 2D arrays with 1-D boolean arrays is broken

mikefc tracker at bugs.pypy.org
Mon Apr 9 05:31:18 CEST 2012


mikefc <coolbutuseless at gmail.com> added the comment:

I can confirm that this still happens on latest OSX nightly.
==========
Python 2.7.2 (df6b4266c2e9, Apr 08 2012, 01:00:14)
[PyPy 1.9.1-dev0 with GCC 4.2.1] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``PyPy is not a real VM: no
segfault handlers to do the rare cases''
>>>> import numpypy as np
>>>> a = np.array([[1,2,3],[4,5,6],[7,8,9]],int)
>>>> b = np.array([7,8,9],int)
>>>> c = np.array([True,False,True],bool)
>>>> b[c]
array([7, 9])
>>>> a[c]
Traceback (most recent call last):
  File "<console>", line 1, in <module>
IndexError: invalid index
>>>>

----------
nosy: +mikefc
status: unread -> chatting

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1118>
________________________________________


More information about the pypy-issue mailing list