[Numpy-discussion] views and object lifetime

Gael Varoquaux gael.varoquaux at normalesup.org
Wed Feb 18 08:15:38 EST 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