griddata运行时错误-Python/SciPy(插值) [英] griddata runtime error -- Python / SciPy (Interpolation)
问题描述
我使用scipy的griddate函数进行插值.
I use scipy's griddate-function for interpolation.
当python执行griddata-function时,以下错误消息表示什么?
What does the following error message means which appears when python is executing the griddata-function?
File "C:\Python25\lib\site-packages\scipy\interpolate\ndgriddata.py", line 182, in griddata
ip = LinearNDInterpolator(points, values, fill_value=fill_value)
File "interpnd.pyx", line 192, in interpnd.LinearNDInterpolator.__init__ (scipy\interpolate\interpnd.c:2524)
File "qhull.pyx", line 917, in scipy.spatial.qhull.Delaunay.__init__ (scipy\spatial\qhull.c:4030)
File "qhull.pyx", line 170, in scipy.spatial.qhull._construct_delaunay (scipy\spatial\qhull.c:1269)
RuntimeError: Qhull error
推荐答案
这通常意味着您传递的点集无法进行三角测量.可能发生这种情况的一些常见情况:
This typically means that the point set you passed in cannot be triangulated. Some common cases when this might occur:
- 您具有2D数据,但是所有点都位于一条线上.在这种情况下,不会将数据三角剖分为非退化三角形.
- 您具有3D数据,但是所有点都位于一个平面上,因此不会分解为未退化的四面体.等等,以更高的维度.
在这些情况下,插值也没有意义,因此此失败并不表示存在错误,而是griddata
的错误使用.
In these cases, interpolation does not make sense either, so this failure is not an indication of a bug, but incorrect usage of griddata
.
通常,Qhull打印有关stderr出了什么问题的其他信息,因此请检查程序输出以查看其内容.
Typically, Qhull prints additional information on what went wrong to stderr, so check the program output to see what it says.
这篇关于griddata运行时错误-Python/SciPy(插值)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!