[Numpy-discussion] Efficient scaling of array
Zachary Pincus
zachary.pincus at yale.edu
Mon May 4 11:52:20 EDT 2009
scipy.ndimage.zoom (and related interpolation functions) would be a
good bet -- different orders of interpolation are available, too,
which can be useful.
Zach
On May 4, 2009, at 11:40 AM, Johannes Bauer wrote:
> Hello list,
>
> is there a possibility to scale an array by interpolation,
> automatically? For illustration a 1D-example would be an array of size
> 5, which is scaled to size 3:
>
> before: [ 1, 2, 3, 4, 5 ]
> 1/1 2/3
> 1/3 1 1/3
> 2/3 1
> after : [ 2.33, 5, 7.66 ]
>
>
> The same thing should be possible in nD, with the obvious analogy. Is
> there such a function in numpy?
>
> Kind regards,
> Johannes
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
More information about the NumPy-Discussion
mailing list