0

我正在对向量执行迭代过程。

我已经为许多数据集(实际上是图像)做了这个。并且从未遇到过错误。在这个完全随机的图像上,经过多次成功迭代后出现以下错误:

wt = 1-stats.chi2.cdf(chisqr,[bands])
File "C:\Python27\lib\site-packages\scipy\stats\distributions.py", line 1347, in cdf
place(output,cond,self._cdf(*goodargs))
File "C:\Python27\lib\site-packages\scipy\stats\distributions.py", line 2540, in _cdf
return special.chdtr(df, x)
TypeError: ufunc 'chdtr' not supported for the input types, and the inputs 
could not be   safely coerced to any supported types according to the casting 
rule ''safe''
[Finished in 2640.6s with exit code 1]

chdtr(v, x) 返回自由度为 v 的卡方概率密度函数左侧尾部(从 0 到 x)下的面积。我不确定它会遇到什么问题?有人有线索吗?特别是因为它在许多迭代中运行平稳。任何人都知道什么会引发这个错误?

4

0 回答 0