[Numpy-discussion] is ndarray.base the closest base or the ultimate base?
Tue Sep 22 21:46:22 CDT 2009
On Tue, Sep 22, 2009 at 3:14 PM, Citi, Luca <email@example.com> 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
> 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
> 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
> 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
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion