[PYTHON MATRIX-SIG] Re: take() again

Konrad Hinsen hinsen@ibs.ibs.fr
Thu, 22 Aug 1996 20:01:53 +0100

Carlos Fonseca wrote:
> I am not familiar with J, but from what I've read in this list, it would
> seem to have very complete multidimensional array handling. Why would
> "full" functionality not be realistic? Too complex, perhaps?

The implementation might take so long that we'll never get to beta
I don't see any problems in principle.

> One could always write take(a,[indices]) to get the current behaviour with
> axis=2, if indices is 1d. More generally, one could write
> take( a[(ni-1)*(NewAxis,)],indices[(Ellipses,)+ax*(NewAxis,)+(All,)] )

Would you really like to write that? Or read it?

> The above may not look nice, but it would work for *all* cases, and the
> default values should cover *most* cases. Currently, take()'s

For any reasonably frequent expression there should be a readable
form. This doesn't have to be the default, but what you have written
above doesn't qualify as Python code in my eyes ;-)

Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-
Institut de Biologie Structurale       | Fax:  +33-
41, Ave. 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