Python - pchip警告

时间:2013-01-22 14:51:52

标签: python numpy scipy interpolation

每当我使用scipy的pchip插值进行张量积插值时,我会得到以下两个警告:

/usr/lib/python2.7/dist-packages/scipy/interpolate/polyint.py:894:
RuntimeWarning: divide by zero encountered in divide
  whmean = 1.0/(w1+w2)*(w1/mk[1:] + w2/mk[:-1])

/usr/lib/python2.7/dist-packages/scipy/interpolate/polyint.py:874:    
RuntimeWarning: divide by zero encountered in double_scalars
  return np.where((d1==0) | (m0==0), 0.0, 1.0/(1.0/m0+1.0/d1))

有人知道是什么原因引起的吗?插值的输出似乎仍然正确。

0 个答案:

没有答案