Re: [Numpy-discussion] Subclassing ndarray with concatenate

2013-02-01 Thread Todd
On Wed, Jan 30, 2013 at 11:20 AM, Sebastian Berg wrote: > > > > > > > > In my particular case at least, there are clear ways to > > handle corner > > > cases (like being passed a class that lacks these > > attributes), so in > > > principle there no problem

Re: [Numpy-discussion] Subclassing ndarray with concatenate

2013-01-30 Thread Sebastian Berg
On Wed, 2013-01-30 at 10:24 +0100, Todd wrote: > On Tue, Jan 22, 2013 at 1:44 PM, Sebastian Berg > wrote: > Hey, > > On Tue, 2013-01-22 at 10:21 +0100, Todd wrote: > > > > The main exception I have found is concatenate (and > hstack/vstack

Re: [Numpy-discussion] Subclassing ndarray with concatenate

2013-01-30 Thread Todd
On Tue, Jan 22, 2013 at 1:44 PM, Sebastian Berg wrote: > Hey, > > On Tue, 2013-01-22 at 10:21 +0100, Todd wrote: > > > The main exception I have found is concatenate (and hstack/vstack, > > which just wrap concatenate). In this case, __array_finalize__ is > > passed an array that has already been

Re: [Numpy-discussion] Subclassing ndarray with concatenate

2013-01-22 Thread Sebastian Berg
On Tue, 2013-01-22 at 13:44 +0100, Sebastian Berg wrote: > Hey, > > On Tue, 2013-01-22 at 10:21 +0100, Todd wrote: > > I am trying to create a subclass of ndarray that has additional > > attributes. These attributes are maintained with most numpy functions > > if __array_finalize__ is used. > >

Re: [Numpy-discussion] Subclassing ndarray with concatenate

2013-01-22 Thread Sebastian Berg
Hey, On Tue, 2013-01-22 at 10:21 +0100, Todd wrote: > I am trying to create a subclass of ndarray that has additional > attributes. These attributes are maintained with most numpy functions > if __array_finalize__ is used. > You can cover a bit more if you also implement `__array_wrap__`, thou

[Numpy-discussion] Subclassing ndarray with concatenate

2013-01-22 Thread Todd
I am trying to create a subclass of ndarray that has additional attributes. These attributes are maintained with most numpy functions if __array_finalize__ is used. The main exception I have found is concatenate (and hstack/vstack, which just wrap concatenate). In this case, __array_finalize__ i