Neal Becker wrote:
> How is it ensured, at the C api level, that when I have an array A, and a view
> of it B, that the data is not destroyed until both A and B are?
>
One array, A, owns the data and will deallocate it only when its
reference-count goes to 0.The view, B, has a reference to
> 2009/2/18 Neal Becker :
> Matthieu Brucher gmail.com> writes:
>
>>
>> B has a reference to A.
>
> Could you be more specific? Where is this reference stored? What C api
> functions are used?
I'm probably not qualified to be much more specific, these links
should provide the necessary detail:
On Wed, Feb 18, 2009 at 01:02:54PM +, 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
__
2009/2/18 Neal Becker :
> Matthieu Brucher gmail.com> writes:
>
>>
>> B has a reference to A.
>
> Could you be more specific? Where is this reference stored? What C api
> functions are used?
I don't remember, and I don't have the Numpy book here. But if B is a
view on A, a flag indicates that B
Matthieu Brucher gmail.com> writes:
>
> B has a reference to A.
Could you be more specific? Where is this reference stored? What C api
functions are used?
> Matthieu
>
> 2009/2/18 Neal Becker gmail.com>:
> > How is it ensured, at the C api level, that when I have an array A, and a
view
> >
B has a reference to A.
Matthieu
2009/2/18 Neal Becker :
> How is it ensured, at the C api level, that when I have an array A, and a view
> of it B, that the data is not destroyed until both A and B are?
>
> ___
> Numpy-discussion mailing list
> Numpy-d
How is it ensured, at the C api level, that when I have an array A, and a view
of it B, that the data is not destroyed until both A and B are?
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-d