[Numpy-discussion] dedicated function for resize with averaging or rebin 2d arrays?
Mon Nov 14 11:24:40 CST 2011
On 11/11/11 8:28 PM, Craig Yoshioka wrote:
> I once wrote a generic n-dimensional binning routine in C that I
> could find if anyone is interested in integrating it into numpy... it
> didn't do size increases though... and I think I implemented it so
> that binning by a non-divisible factor trimmed the extras. It was
> very-very fast though.
And I've got one written in Cython. I'd been thinking of contributing it
to ndimage, but never got around to it -- but I'd be glad to share. Let
me know if you want it.
>> I think the usefulness of the rebin function is to be simple and fast,
>> and the best would be to implement it in the core numpy, as a simple
>> method for smoothing and reshaping,
Does it have common use=-cases outside image processing? If not, then
no, it shouldn't be in numpy.
> without the need of using scipy.
I don't think you need all of scipy to use the ndimage toolkit -- at
least I hope not.
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
More information about the NumPy-Discussion