[Numpy-discussion] dedicated function for resize with averaging or rebin 2d arrays?
zonca at deepspace.ucsb.edu
Fri Nov 11 01:41:21 EST 2011
I work in astrophysics where the most common programming language is
A common request of people switching from IDL to python is the
implementation of the REBIN function, which either downsizes a 2d
array by averaging or increases its dimension by repeating its
elements. In both cases the new shape must be an integer factor of the
I believe it is a very handy function for quick smoothing of 2 dimensional data.
I found a discussion about this topic in the archives:
Do you think it would be useful to add such function to numpy?
I created a simple implementation to help in the discussion:
More information about the NumPy-Discussion