[MATRIX-SIG] FancyArray

Konrad Hinsen hinsen@ibs.ibs.fr
Sat, 30 Aug 1997 15:27:33 +0200

> Yes, but I'd still argue that the natural thing to get back is a copy of
> the same type as what you put in. Reshaping a UserArray should really
> return a UserArray.

Sure. But what about more complicated situations? What
should add(a, b) return if a and b are instances of different subclasses
of UserArray?

> The way to deal with this is to shadow the functions from multiarray with
> python functions in order to "add extra intelligence to the basic C
> functions" (from Numeric.py). In order to fix reshape, for instance,  one

Which adds overhead to every function call. It would be better to
implement a good strategy right in the C code - but first there must
be a good strategy.

Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-
Institut de Biologie Structurale       | Fax:  +33-
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais

MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org