python - 如何在 Python 中为 LinearNDInterpolator 使用 Qhull 选项?
问题描述
我正在尝试计算插值:
import scipy.interpolate as si
import scipy
f = si.LinearNDInterpolator(Q, h)
它给了我以下错误:
QhullError: qhull precision warning:
The initial hull is narrow (cosine of min. angle is 1.0000000000000000).
Is the input lower dimensional (e.g., on a plane in 3-d)? Qhull may
produce a wide facet. Options 'QbB' (scale to unit box) or 'Qbb' (scale
last coordinate) may remove this warning. Use 'Pp' to skip this warning.
我的问题是:如何将选项更改为 QbB?
解决方案
LinearNDInterpolator
有关键字rescale
,这可能会有所帮助。
关于 Qhull 选项,您可以在实际执行三角剖分时指定它们,通过scipy.spatial.Delaunay
. 然后,您可以将三角测量对象提供给LinearNDInterpolator
.
推荐阅读
- python - 怎么样,为什么我有过拟合?
- unix - 将重命名命令的结果存储在变量中
- java - 将 Spring Boot 连接到 SQL Server Express
- reactjs - 安装包含 React Final Form 和酶的反应组件
- php - 排序后如何从 SQL 中获取数据并确保没有重复
- python - 重复模式的正则表达式?
- python - NameError: 名称 'fooAlpha' 未定义
- css - 在同一个 CSS a:after 元素中是否可以有两种不同的文本颜色?
- javascript - React - 在动态表中调用 OnChange 会产生 Uncaught TypeError
- javascript - 将项目与响应式卡片的末尾对齐,垂直居中