[Numpy-discussion] interpolation in numpy

Joe Kington jkington@wisc....
Thu Jul 9 09:52:40 CDT 2009

scipy.ndimage.zoom is exactly what you're looking for, as Zach Pincus
already said.

As far as I know, numpy doesn't have any 3D interpolation routines, so
you'll have to install scipy. Interp2d will only interpolate slices of your
data, not the whole volume.


On Thu, Jul 9, 2009 at 8:42 AM, Thomas Hrabe <thrabe@googlemail.com> wrote:

> Hi all,
> I am not a newbie to python and numpy, but however, I kinda do not
> find a proper solution for my interpolation problem without coding it
> explicitly myself.
> All I want to do is to increase the resolution of an tree dimensional
> array.
> I have a volume 'a'
> a = numpy.random.rand(3,3,3)
> now, I would like to expand a to a volume b of size say 10x10x10
> I want b to have interpolated values from a. One could think of this
> procedure as "zooming" into the volume, similar for images or so.
> numpy.interp does such a thing for 1d, but is there such function for 3d,
> too?
> Thank you in advance for your help,
> Thomas
> FYI: I do not have scipy installed
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090709/12075097/attachment.html 

More information about the NumPy-Discussion mailing list