Ludwig,
Masked arrays will do exactly what you want. You have your choice of
the numpy.ma version or the external maskedarray class.
Eric
Ludwig M Brinckmann wrote:
> Hi there,
>
> I have a 2D array of size, lets say 4 * 512, which I need to
> downsample by a step of 4 in the y direction
Hi there,
I have a 2D array of size, lets say 4 * 512, which I need to downsample
by a step of 4 in the y direction, and step 3 in the x direction, so I would
get an array of 1 * 170 (or 171, the edges do not matter much). But what
I need to retain are the maxima and minima in every 4*3 w