关于scipy.stats.linregress导入后报错TypeError的问题

关于scipy.stats.linregress导入后报错TypeError的问题

我用scipy.stats.linregress进行最小二乘回归。在pycharm中,程序可以正常执行,结果正确,也没有报错。但调试时总是报错。请各位帮忙看看什么原因?
Python 3.10.1 64位
numpy 1.22.0 64位
scipy 1.7.3 64位
报错信息如下:

Traceback (most recent call last):

File "C:\Program Files\Python310\lib\site-packages\numpy\core\getlimits.py", line 516, in __init__

self.dtype = numeric.dtype(int_type)

TypeError: 'NoneType' object is not callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "<frozen importlib._bootstrap>", line 1027, in _find_and_load

File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked

File "<frozen importlib._bootstrap>", line 688, in _load_unlocked

File "<frozen importlib._bootstrap_external>", line 883, in exec_module

File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed

File "D:\workspace\python\tuvn\my_funcs\__init__.py", line 39, in <module>

from my_funcs.get_rsrs import get_rsrs

File "D:\workspace\python\tuvn\my_funcs\get_rsrs.py", line 2, in <module>

from scipy import stats

File "C:\Program Files\Python310\lib\site-packages\scipy\stats\__init__.py", line 441, in <module>

from .stats import *

File "C:\Program Files\Python310\lib\site-packages\scipy\stats\stats.py", line 37, in <module>

from scipy.spatial.distance import cdist

File "C:\Program Files\Python310\lib\site-packages\scipy\spatial\__init__.py", line 101, in <module>

from ._procrustes import procrustes

File "C:\Program Files\Python310\lib\site-packages\scipy\spatial\_procrustes.py", line 9, in <module>

from scipy.linalg import orthogonal_procrustes

File "C:\Program Files\Python310\lib\site-packages\scipy\linalg\__init__.py", line 195, in <module>

from .misc import *

File "C:\Program Files\Python310\lib\site-packages\scipy\linalg\misc.py", line 4, in <module>

from .lapack import get_lapack_funcs

File "C:\Program Files\Python310\lib\site-packages\scipy\linalg\lapack.py", line 990, in <module>

_int32_max = _np.iinfo(_np.int32).max

File "C:\Program Files\Python310\lib\site-packages\numpy\core\getlimits.py", line 518, in __init__

self.dtype = numeric.dtype(type(int_type))

TypeError: 'NoneType' object is not callable

以上是 关于scipy.stats.linregress导入后报错TypeError的问题 的全部内容, 来源链接: utcz.com/p/938218.html

回到顶部