每当我使用 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))
有人知道是什么原因造成的吗?我的插值输出似乎仍然正确。