[Numpy-discussion] views and object lifetime

Gael Varoquaux gael.varoquaux@normalesup....
Wed Feb 18 07:15:38 CST 2009


On Wed, Feb 18, 2009 at 01:02:54PM +0000, Neal Becker wrote:
> > B has a reference to A.

> Could you be more specific?  Where is this reference stored? 

In [1]: import numpy as np

In [2]: a = np.empty(10)

In [3]: b = a[::2]

In [4]: b.base is a
Out[4]: True


Gaël


More information about the Numpy-discussion mailing list