Hi,<br><br><span>I think you should look into scipy.ndimage which has minimum_filter and maximum_filter<br><br>Matthieu<br></span><br><div><span class="gmail_quote">2007/7/24, Ludwig M Brinckmann <<a href="mailto:ludwigbrinckmann@gmail.com">
ludwigbrinckmann@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi there, <br><br>I have a large array, lets say 40000 * 512, which I
need to downsample by a factor of 4 in the y direction, by factor 3 in
the x direction, so that my resulting arrays are 10000 * 170 (or 171
this does not matter very much) - but of all the values I will need to
retain in the downsampled arrays the minimum and maximum of the
original data, rather than computing an average or just picking every
third/fourth value in the array. <br>So essentially I have a 4*3 window, for which I need the min and
max in this window, and store the result of applying this window to the
original array as my results.<br><br>What is the best way to do this?<br><br>Regards
<br><span class="sg"><span>Ludwig</span>
</span><br>_______________________________________________<br>Numpy-discussion mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Numpy-discussion@scipy.org">Numpy-discussion@scipy.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://projects.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://projects.scipy.org/mailman/listinfo/numpy-discussion</a><br><br></blockquote>
</div><br>