|
Re: rebin: msg#00072python.numeric.general
On Aug 27, 2004, at 8:34 PM, Russell E. Owen wrote: Any suggestions on an efficient means to bin a 2-d array? REBIN is the IDLNote that a boxcar smoothing costs no more than doing the above averaging. So in numarray, you could do the following: from numarray.convolve import boxcar b = boxcar(a, (n,n)) rebinnedarray = b[::n,::n].copy() or something like this (I haven't tried to figure out the correct offset for the slice) where one wants to rebin by a factor of n in both dimensions. We should probably add a built in function to do this. Perry ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: rebin: 00072, Nadav Horesh |
|---|---|
| Next by Date: | Re: rebin: 00072, Russell E Owen |
| Previous by Thread: | rebini: 00072, Russell E. Owen |
| Next by Thread: | Re: rebin: 00072, Russell E Owen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |