【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' object has no attribute 'lock'ErrorObject
- AttributeError: module ‘requests‘ has no attribute ‘_version_‘Error
- AttributeError: 'dict' object has no attribute 'has_key'ErrorObject
- 問題解決:AttributeError: ‘NoneType‘ object has no attribute ‘append‘ErrorNoneObjectAPP
- 解決pycharm問題:module 'pip' has no attribute 'main'PyCharmAI
- AttributeError: module...ops‘ has no attribute ‘_TensorLike‘, ValueError: `updates` argument..eagerError
- AttributeError: 'Settings' object has no attribute 'HBase'ErrorObject
- AttributeError: module ‘tensorflow._api.v1.nn.rnn_cell‘ has no attribute ‘InputProjectionWrapper‘ErrorAPIRNNProjectAPP
- AttributeError: module‘ tensorflow_core._api.v2. train‘ has no attribute‘ AdamOptimizer‘ErrorAPIAI
- Myeclipse 錯誤An internal error has occurred 解決辦法EclipseError
- module ‘h5py‘ has no attribute ‘File‘H5
- Cargo invocation has failed: Error: exit code: 101.解決辦法CargoAIError
- ModuleNotFoundError: No module named ‘DBUtils‘解決辦法Error
- module ‘tensorflow‘ has no attribute ‘get_default_graph‘
- 複雜網路中louvain演算法實現時報錯AttributeError: module ‘community‘ has no attribute ‘best_partition‘AI演算法ErrorUnity
- Rasa init報錯:AttributeError: type object 'Callable' has no attribute '_abc_registry'ErrorObject
- Traceback (most recent call last): File "AttributeError: 'NoneType' object has no attribute 'group'ASTErrorNoneObject
- Vue 下 ESLint 的 error 解決辦法VueEsLintError
- FTP Connection refused error 解決辦法FTPError
- This function has none of DETEMINISTIC,NO SQL錯誤解決辦法FunctionNoneSQL
- ORA-28001: the password has expired解決辦法
- Openstack的error殭屍例項的解決辦法Error
- Qt5交叉編譯Project Error: Unknown module(s) in QT: script-private解決辦法QT編譯ProjectError
- “command-not-found has crashed” 解決辦法 (*unsolved)
- ModuleNotFoundError: No module named ‘matplotlib‘ 一系列解決辦法Error
- PHP Warning: exec() has been disabled for security 問題解決辦法PHP
- ERROR 1290 (HY000) 解決辦法Error
- Oracle opatch apply 時提示oci.dll has active的解決辦法OracleAPP
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions報錯解決辦法Express
- mysqldump error1066 錯誤的解決辦法MySqlError
- VS 2017 Git failed with a fatal error的解決辦法GitAIError
- 帝國CMSr的Fatal error:Allowed memory size of的解決辦法Error
- Starting sendmial: make: Warning: File 'virtusertable.db' has ..的解決辦法2
- catalog is missing 10 attribute(s)錯誤的解決辦法一例
- Navicat tnt版本提示“failed to save password error code”的解決辦法AIError
- 安裝VMware出現“Error 1406”的解決辦法Error
- Process object has no attribute '_popen'Object