[MATRIX-SIG] reverse of take?

P.S.Craig@durham.ac.uk P.S.Craig@durham.ac.uk
Thu, 3 Jul 1997 15:33:38 +0100 (BST)


Aaron Watters writes:
> 
> > So what we are talking about now is an alternative implementation of
> > the reference object which musts store more than just three numbers
> > per dimension. There are several possible implementations; I suppose
> > the easiest is a list of integer indices per dimension, referring to
> > the array data object.
> 
> 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
> 

Actually, I suspect both have their merits in different contexts. The
merit of Aaron's proposal is complete flexibility. The merit of
Konrad's, which was also my initial intention, is that we can save
memory and some computing time for such an array which has shape
(100,100,100) since under Konrad's proposal this requires 300 integer
indices and under Aaron's requires 1000000 pointers.

The choice between the two, if we cannot accept having three
implementations of array referencing, depends on the future of
indexing beyond my earlier proposal. The really exotic ideas may well
need Aaron's version though I have to admit I havent thought about
this aspect at all carefully yet.

Peter Craig


_______________
MATRIX-SIG  - SIG on Matrix Math for Python

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