[MATRIX-SIG] reverse of take?

Konrad Hinsen hinsen@ibs.ibs.fr
Tue, 1 Jul 1997 17:18:18 +0200


> Also Peter Craig notes a problem with:
> 
>   A[A2][A3] = x
> 
> [Note: to python this parses as value A[A2] indexed assigned at A3
> to x.  The intuitive reading is change A at indexes A2 reindexed at
> indices A3 to x.]
> 
> In this notation the updates should propagate all the way back to A
> as Peter Craig points out.  This is a Big Problem AFAIK, since I'm

They do with the current NumPy indexing, which returns not a copy
of the array, but a reference to the same data space with different
pointers and offsets. But that would be hard to keep up with general
list indices!

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