使用`scipy.interpolate.interpn`中的参数方法存在问题。

huangapple go评论63阅读模式
英文:

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

问题

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

我想要插值的数据维度是三维的维度如下

[90, 180, 8]当参数 method 设置为 'cubic'会报错ValueError: interpn 只支持 'linear''nearest''splinef2d' 方法您提供的是 cubic
为什么呢3D 数据不支持这样的参数设置吗

我想要实现对三维数据的立方样条插值
英文:

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

得分: 2

检查您的scipy版本:立方模式仅在scipy 1.10中添加。

英文:

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

huangapple
  • 本文由 发表于 2023年7月3日 17:00:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76603304.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定