[Python-Dev] RE: [Numpy-discussion] Numeric life as I see it

Perry Greenfield perry at stsci.edu
Thu Feb 10 16:21:24 CET 2005


Paul Dubois wrote:

>
> Aside: While I am at it, let me reiterate what I have said to the other
> developers privately: there is NO value to inheriting from the array
> class. Don't try to achieve that capability if it costs anything, even
> just effort, because it buys you nothing. Those of you who keep
> remarking on this as if it would simply haven't thought it through IMHO.
> It sounds so intellectually appealing that David Ascher and I had a
> version of Numeric that almost did it before we realized our folly.
>
To be contrarian, we did find great benefit (at least initially) for
inheritance for developing the record array and character array classes
since they share so many structural operations (indexing, slicing,
transposes,
concatenation, etc.) with numeric arrays. It's possible that the approach
that Travis is considering doesn't need to use inheritance to accomplish
this (I don't know enough about the details yet), but it sure did save a
lot of duplication of implementation.

I do understand what you are getting at. Any numerical array inheritance
generally forces one to reimplement all ufuncs and such, and that does
make it less useful in that case (though I still wonder if it still isn't
better than the alternatives)

Perry Greenfield




More information about the Python-Dev mailing list