[Numpy-discussion] is ndarray.base the closest base or the ultimate base?
David Goldsmith
d.l.goldsmith@gmail....
Tue Sep 22 21:46:22 CDT 2009
On Tue, Sep 22, 2009 at 3:14 PM, Citi, Luca <lciti@essex.ac.uk> wrote:
> My vote (if I am entitled to) goes to "change the code".
>
Whether or not the addressee of .base is an array, it should be "the object
> that has to be kept alive such that the data does not get deallocated"
> rather "one object which will keep alive another object, which will keep
> alive another object, ...., which will keep alive the object with the data".
> On creation of a new view B of object A, if A has ONWDATA true then B.base
> = A, else B.base = A.base.
>
> When working on
> http://projects.scipy.org/numpy/ticket/1085
> I had to walk the chain of bases to establish whether any of the inputs and
> the outputs were views of the same data.
> If "base" were the ultimate base, one would only need to check whether any
> of the inputs have the same base of any of the outputs.
>
> I tried to modify the code to change the behaviour.
> I have opened a ticket for this
> http://projects.scipy.org/numpy/ticket/1232
> and attached a patch but I am not 100% sure.
> I changed PyArray_View in convert.c and a few places in mapping.c and
> sequence.c.
>
> But if there is any reason why the current behaviour should be kept, just
> ignore the ticket.
>
You don't mean that literally, right? A ticket can't just be ignored: it
can be changed to "will not fix," with, hopefully, a good explanation as to
why, but it has to be resolved and closed in some fashion, not just ignored,
or someone somewhere down the line will try to address it substantively. :-)
In any event, I think we need a few more "heavyweights" to weigh in on this
before code is changed: Robert? Charles? Travis? Anyone? Anyone wanna
"block"?
DG
>
> Luca
> _______________________________________________
> 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/f6410008/attachment.html
More information about the NumPy-Discussion
mailing list