Mar-16-2020, 11:36 AM
If you have a meshgrid data, e.g.
import numpy as np # x, y -- 1D arrays X, Y = np.meshgrid(x, y) # Z is a matrix,you can always do
interpolate.interp2d(X.ravel(), Y.ravel(), Z.ravel())Another option, that should also work, is
interpolate.interp2d(x, y, Z)It seems (from the docs) that MatLab's interp2 and scipy's interp2d do not differ significantly.