[MATRIX-SIG] reverse of take?

Konrad Hinsen hinsen@ibs.ibs.fr
Thu, 3 Jul 1997 17:22:34 +0200


> I say the easiest and maybe the most efficient is an actual array of
> pointers *into* the other array (not sequences of indices).  There are 
> probably nuances I'm missing.  -- Aaron Watters

With pointers you need one per array element, whereas with integers
you need only one per index. In other words, for an array of shape
(10, 20, 30) you need either 10x20x30=6000 pointers or 10+20+30=60
integers. One the other hand, integer indices become a bit more
complex when we allow higer-rank indices, whereas a pointer
implementation remains the same.

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
_______________