Re: [Numpy-discussion] Subclassing record array

2009-10-18 Thread Darren Dale
On Sun, Oct 18, 2009 at 12:22 AM, Charles R Harris wrote: > > > On Sat, Oct 17, 2009 at 9:13 AM, Loïc BERTHE wrote: >> >>   Hi, >> >> I would like to create my own class of record array to deal with units. >> >> Here is the code I used, inspired from >> >> http://docs.scipy.org/doc/numpy-1.3.x/us

Re: [Numpy-discussion] Subclassing record array

2009-10-17 Thread Charles R Harris
On Sat, Oct 17, 2009 at 9:13 AM, Loïc BERTHE wrote: > Hi, > > I would like to create my own class of record array to deal with units. > > Here is the code I used, inspired from > > http://docs.scipy.org/doc/numpy-1.3.x/user/basics.subclassing.html#slightly-more-realistic-example-attribute-added

[Numpy-discussion] Subclassing record array

2009-10-17 Thread Loïc BERTHE
Hi, I would like to create my own class of record array to deal with units. Here is the code I used, inspired from http://docs.scipy.org/doc/numpy-1.3.x/user/basics.subclassing.html#slightly-more-realistic-example-attribute-added-to-existing-array : [code] from numpy import * class BlocArra