Problem with the use of parameter method in scipy.interpolate.interpn

130 Views Asked by At

scipy.interpolate.interpn(points, values, xi, method='linear', bounds_error=True, fill_value=nan)[source]

The data dimension I want to interpolate is three-dimensional. The dimensions are like this

[90, 180, 8]. When the parameter method is set to 'cubic', an error will be reported:ValueError: interpn only understands the methods 'linear', 'nearest', and 'splinef2d'. You provided cubic. Why? Does 3D data not support such parameter settings?

I want to realize cubic Spline interpolation interpolation of 3D data.

1

There are 1 best solutions below

2
ev-br On BEST ANSWER

Check your scipy version: the cubic mode was only added in scipy 1.10.