python中griddata的外插值_griddata运行时错误-Python / SciPy(插值)

bd96500e110b49cbb3cd949968f18be7.png

I use scipy's griddate-function for interpolation.

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:

You have 2D data, but all the points lie along a line. In this case there is no triangulation of the data to non-degenerate triangles.

You have 3D data, but all the points lie on a plane, so no decomposition to non-degenerate tetrahedra. And so on to higher dimensions.

In these cases, interpolation does not make sense either, so this failure is not an indication of a bug, but incorrect usage of griddata.

Typically, Qhull prints additional information on what went wrong to stderr, so check the program output to see what it says.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值