Re: [Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Sebastian Haase
On Fri, Oct 1, 2010 at 2:20 PM, Pierre GM wrote: > > On Oct 1, 2010, at 1:03 PM, Sebastian Haase wrote: > However, I had done this before for some specific image-file-types: those would add there own attribute to ndarray array (e.g. arr.Mrc) Now if I call the new  ndarray_meta on my

Re: [Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Pierre GM
On Oct 1, 2010, at 1:03 PM, Sebastian Haase wrote: >>> However, I had done this before for some specific image-file-types: >>> those would add there own attribute to ndarray array (e.g. arr.Mrc) >>> Now if I call the new ndarray_meta on my ndarray_with_mrc I loose the >>> `Mrc` attribute, leavin

Re: [Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Sebastian Haase
On Fri, Oct 1, 2010 at 12:38 PM, Pierre GM wrote: > > On Oct 1, 2010, at 11:26 AM, Sebastian Haase wrote: > >> Hi, >> I'm trying to add a 'meta' attribute to ndarray to keep track of image >> data filenames and resolution etc. >> Following  the excellent document >> http://docs.scipy.org/doc/numpy

Re: [Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Pierre GM
On Oct 1, 2010, at 11:26 AM, Sebastian Haase wrote: > Hi, > I'm trying to add a 'meta' attribute to ndarray to keep track of image > data filenames and resolution etc. > Following the excellent document > http://docs.scipy.org/doc/numpy/user/basics.subclassing.html > this worked right away. > >

Re: [Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Sebastian Haase
On Fri, Oct 1, 2010 at 11:26 AM, Sebastian Haase wrote: > Hi, > I'm trying to add a 'meta' attribute to ndarray to keep track of image > data filenames and resolution etc. > Following  the excellent document > http://docs.scipy.org/doc/numpy/user/basics.subclassing.html > this worked right away. >

[Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Sebastian Haase
Hi, I'm trying to add a 'meta' attribute to ndarray to keep track of image data filenames and resolution etc. Following the excellent document http://docs.scipy.org/doc/numpy/user/basics.subclassing.html this worked right away. However, I had done this before for some specific image-file-types: t