[Numpy-discussion] is ndarray.base the closest base or the ultimate base?

David Goldsmith d.l.goldsmith@gmail....
Tue Sep 22 15:41:19 CDT 2009


So, what's the "bottom-line" of this thread: does the doc need to be
changed, or the code?

DG

2009/9/21 Hans Meine <meine@informatik.uni-hamburg.de>

> Hi!
>
> On Monday 21 September 2009 12:31:27 Citi, Luca wrote:
> > I think you do not need to do the  chain up walk on view creation.
> > If the assumption is that base is the ultimate base, on view creation
> > you can do something like (pseudo-code):
> > view.base = parent if parent.owndata else parent.base
>
> Hmm.  My impression was that .base was for refcounting purposes *only*.
>  Thus,
> it is not even guaranteed that the attribute value is an array(-like)
> object.
>
> For example, I might want to allow direct access to some internal buffers
> of
> an object of mine in an extension module; then, I'd use .base to bind the
> lifetime of my object to the array (the lifetime of which I cannot control
> anymore).
>
> Ciao,
>   Hans
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090922/c15d29e1/attachment.html 


More information about the NumPy-Discussion mailing list