[Matrix-SIG] Numerical plans (fwd)
David Ascher
da@ski.org
Tue, 14 Sep 1999 09:14:26 -0700 (Pacific Daylight Time)
On Fri, 10 Sep 1999, Les Schaffer wrote:
> Paul DuBois said:
>
> > Older and wiser, we will try again.
>
> since you seem to be in reflection mode, i was wondering if you could
> explain to the dummies among us (me, myself and i) what was the
> purpose of this attempt at using extension classes for NumPy?
>
> I never caught on, from the discussions here, what the value was
> supposed to be to the -- ahem -- average user.
Well, since I think I was the main force behind that, I'll say that the
main idea was that I wanted to be able to continue work on the
functionality of array objects in Python, not in C. The C code is a mess,
and I felt it much easier to do things like the indexing that Paul was
talking about (called many things my many people) in Python.
ExtensionClasses was supposed to allow this sort of subclassing easily.
Other ideas included things like being able to specify (again, in Python)
different coercion behaviors. Etc.
The issues we hit were:
1) ExtensionClass has some bugs, which are hard to tackle, and the author
(Jim Fulton) is too busy to track them down.
2) ExtensionClass is hard to reconcile with the variety of ways NumPy is
compiled (the CAPI, static/dynamic linking, etc.)
3) Making a type a class simply isn't doable in a backwards compatible way
while keeping the advantages of a class.
Instead, what Paul and I are planning to do is to revert to the old type,
but to do UserArray *right*. The new features that I mention above would
then be implemented in new Python classes, which would use array objects
as member data (I mean, instance attributes).
--david