我如何在 Python 中为 LinearNDInterpolator 使用 Qhull 选项?

How do i use Qhull options for LinearNDInterpolator in Python?

我正在尝试使用以下方法计算插值:

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.