[SciPy-User] 3D scatter data interpolate

Vasco Gervasi yellowhat46 at gmail.com
Sun Feb 21 09:48:24 EST 2016


Sorry but I am not able to understand how map_coordinates works.
Let's say that I am in 2D and I have the points [x=0, y=0] and [x=1, y=1],
and each point has associated a value [x=0, y=0, v=0] and [x=1, y=1, v=2].
My input for map_coordinates should be:

> in_data = np.array([[0.,0.,0.],
>                     [1.,1.,2.]])

I would like to interpolate in the middle point [x=0.5, y=0.5] so the
 coordinates should be;

> lookpoints = np.array([[0.5, 0.5]]).T
>
 So:

> s = map_coordinates(in_data, lookpoints, order=1)
>
But i get s=0.5 not 1.
What am I doing wrong?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20160221/62e7745b/attachment.html>


More information about the SciPy-User mailing list