[MATRIX-SIG] reverse of take?
Konrad Hinsen
hinsen@ibs.ibs.fr
Thu, 3 Jul 1997 19:48:18 +0200
> Yes, and in the "circle" or "fractal border" on byte image
> graphics example you would not get
> much savings in space and also perhaps a speed penalty by saving
Ehhh... Why? The space requirements depend only on the shape of the
array, not its contents. So the difference is negligible only for
something large x small (e.g. 1000x2).
> indices versus pointers, because the indices would be completely
> irregular down to the pixel level. I suppose the
Ah, I see, you want index a 2d array with a list of index tuples, right?
I hadn't even considered this possibility until now. But I can still come
up with an equivalent integer-index solution that is a superset of the
previously discussed one: for each dimension, you store an n-dimensional
array of integer indices, which more or less correspond to the indices
used in the subscript, except that they are adjusted to point to the
array data object directly.
On the other hand, a pointer-based system has clear speed advantages
if the subarray is accessed more often than it is created.
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
_______________