【Error】AttributeError: module ‘scipy.misc‘ has no attribute ‘logsumexp‘ 的解決辦法
$ python -V
Python 3.7.6
需要用到scipy.misc.logsumexp(),但總是報錯
>>> x
array([[ 1., 10.],
[ 2., 20.],
[ 3., 30.]])
>>> scipy.misc.logsumexp(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'scipy.misc' has no attribute 'logsumexp'
解決辦法:將scipy.misc換成scipy.special,就可以了
>>> import scipy.special
>>> scipy.special.logsumexp(x)
30.000045400963103
相關文章
- [轉]成功解決AttributeError: module ‘enum‘ has no attribute ‘IntFlag‘?Error
- AttributeError: module ‘requests‘ has no attribute ‘_version_‘Error
- 問題解決:AttributeError: ‘NoneType‘ object has no attribute ‘append‘ErrorNoneObjectAPP
- AttributeError: module...ops‘ has no attribute ‘_TensorLike‘, ValueError: `updates` argument..eagerError
- AttributeError: module‘ tensorflow_core._api.v2. train‘ has no attribute‘ AdamOptimizer‘ErrorAPIAI
- AttributeError: 'Settings' object has no attribute 'HBase'ErrorObject
- AttributeError: module ‘tensorflow._api.v1.nn.rnn_cell‘ has no attribute ‘InputProjectionWrapper‘ErrorAPIRNNProjectAPP
- 解決pycharm問題:module 'pip' has no attribute 'main'PyCharmAI
- Cargo invocation has failed: Error: exit code: 101.解決辦法CargoAIError
- module ‘tensorflow‘ has no attribute ‘get_default_graph‘
- module ‘h5py‘ has no attribute ‘File‘H5
- Traceback (most recent call last): File "AttributeError: 'NoneType' object has no attribute 'group'ASTErrorNoneObject
- Rasa init報錯:AttributeError: type object 'Callable' has no attribute '_abc_registry'ErrorObject
- 複雜網路中louvain演算法實現時報錯AttributeError: module ‘community‘ has no attribute ‘best_partition‘AI演算法ErrorUnity
- ModuleNotFoundError: No module named ‘DBUtils‘解決辦法Error
- Vue 下 ESLint 的 error 解決辦法VueEsLintError
- “command-not-found has crashed” 解決辦法 (*unsolved)
- ERROR 1290 (HY000) 解決辦法Error
- Qt5交叉編譯Project Error: Unknown module(s) in QT: script-private解決辦法QT編譯ProjectError
- mysqldump error1066 錯誤的解決辦法MySqlError
- catalog is missing 10 attribute(s)錯誤的解決辦法一例
- 1_使用face_recognition模組:錯誤AttributeError:'PngStream' object has no attribute 'chunk fcWp'(20190223)ErrorObject
- PHP Warning: exec() has been disabled for security 問題解決辦法PHP
- ModuleNotFoundError: No module named ‘matplotlib‘ 一系列解決辦法Error
- 問題結局辦法:Error loading psycopg2 module: No module named ‘psycopg2‘Error
- 帝國CMSr的Fatal error:Allowed memory size of的解決辦法Error
- Process object has no attribute '_popen'Object
- ‘dict‘ object has no attribute ‘iteritems‘Object
- multiprocessing pool AttributeError: Can't get attribute 'func'Error
- RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED解決辦法ErrorDNNAI
- Navicat tnt版本提示“failed to save password error code”的解決辦法AIError
- dbeaver 升級 24.1.x 版本提示 An error has occurred 的解決Error
- 在Linux Mint中安裝Clion遇到CMake Error的解決辦法LinuxError
- pip install了之後還是顯示no module named xxx的解決辦法
- pecl PHP Parse error: syntax error, unexpected 'new' (T_NEW) 以及 XML缺失解決辦法PHPErrorXML
- ‘FirewallD‘ object has no attribute ‘path‘ 、‘fw‘、is not registeredObject
- 【坑】Tkinter ‘NoneType‘ object has no attribute ‘destroy‘NoneObject
- Sublime Text 2報 Decode error - output not utf-8 錯誤的解決辦法Error