2d Interpolation In Python With Random Spot
I checked the available interpolation method in scipy, but could not get the proper solution for my case. assume i have 100 points whose coordinates are random, e.g., their x and
Solution 1:
Use scipy.interpolate.griddata
. It does the exact thing you need
# griddata expects an ndarray for the interpolant coordinates
interpolants = numpy.array([xnew, ynew])
# defaults to linear interpolation
znew = scipy.interpolate.griddata((x, y), z, interpolants)
Post a Comment for "2d Interpolation In Python With Random Spot"