[MATRIX-SIG] reverse of take?

Aaron Watters arw@dante.mh.lucent.com
Thu, 3 Jul 1997 11:46:15 -0400



----------
> From: Konrad Hinsen <hinsen@ibs.ibs.fr>
> 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.

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
indices versus pointers, because the indices would be completely
irregular down to the pixel level.  I suppose the 
question becomes how common is regularity?
You matrix guys would know better than I.  For graphics type operations
I can imagine essentially 2 common cases: rectangular subregions (slices as
they now exist), and more or less complete irregularity.  I can't comment on other
possible applications.
  -- Aaron Watters

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

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