[pypy-issue] [issue1466] for slices, __array__interface['data'][0] yields adress of base object's data

kfj tracker at bugs.pypy.org
Thu Apr 25 08:17:04 CEST 2013


New submission from kfj <_kfj at yahoo.com>:

Here's what I observed:

$ pypy
Python 2.7.3 (aa7b56060ddd, Apr 22 2013, 22:03:12)
[PyPy 2.0.0-beta2 with GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``PyPy 1.2 released -
http://pypy.org/''
>>>> import numpypy as np
>>>> a=np.zeros(10)
>>>> a.__array_interface__['data'][0]
-1220095968
>>>> a[2:].__array_interface__['data'][0]
-1220095968                                 <<<<<<<< same value

$ python
Python 2.7.3 (default, Apr 10 2013, 05:46:21)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> a=np.zeros(10)
>>> a.__array_interface__['data'][0]
162282152
>>> a[2:].__array_interface__['data'][0]
162282168                                  <<<<<<<<<<< different value

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

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


More information about the pypy-issue mailing list