[Numpy-discussion] efficient sum of "sparse" 2D arrays?
rays at san.rr.com
Sun Jan 25 22:31:01 CST 2004
The problem: I have a "stack" of 8, 640 x 480 integer image arrays from a
FITS cube concatenated into a 3D array, and I want to sum each pixel such
that the result ignores clipped values (255+); i.e., if two images have
clipped pixels at (x,y) the result along z will be the sum of the other 6.
I'm trying to come up with a pure Numeric way (hopefully so that I can use
weave.blitz) to speed up the calculation.
I just looked into masked arrays, but I'm not familiar with that module at all.
I was guessing someone out there has done this before...
More information about the Numpy-discussion