当我导入 scipy.stats.linregress 时,scipy 和 numpy 出现问题

xin*_*ngq 8 python numpy typeerror scipy

当我导入scipy.stats.linregress, 对 ols 进行一些操作时,有一个TypeError.

当我在 PyCharm 中运行代码时,一切正常。没有错误,我可以获得正确的结果。

但是当我调试代码时,我得到了一个TypeError.

Python 3.10.1 amd64

numpy 1.22.0 amd64

scipy 1.7.3 amd64

我的代码如下所示:

from scipy import stats
results = stats.linregress(low.loc[ind], high.loc[ind])
Run Code Online (Sandbox Code Playgroud)

和这样的错误信息:

from scipy import stats
results = stats.linregress(low.loc[ind], high.loc[ind])
Run Code Online (Sandbox Code Playgroud)