成功解决matplotlib\cbook\deprecation.py:107: MatplotlibDeprecationWarning: Passing one of 'on', 'true',

简介: 成功解决matplotlib\cbook\deprecation.py:107: MatplotlibDeprecationWarning: Passing one of 'on', 'true',

解决问题


matplotlib\cbook\deprecation.py:107: MatplotlibDeprecationWarning: Passing one of 'on', 'true', 'off', 'false' as a boolean is deprecated; use an actual boolean (True/False) instead.

 warnings.warn(message, mplDeprecation, stacklevel=1)



解决思路


错误地址:matplotlib\cbook\deprecation.py:107

Matplotlib弃用警告:将“on”、“true”、“off”、“false”中的一个作为布尔值传递;而是使用实际的布尔值(True/False)。




解决方法


此信息提示为警告,而不是error,即使不处理也不会影响代码编程的运行。如果想要去掉,可以更新库至最新版本!

然后根据要求提示修改使用方法!

该方法在未来的版本中即将被丢弃,可以将“on”、“true”、“off”、“false”中的一个作为布尔值传递;而是使用实际的布尔值(True/False)来代替!



相关文章
|
算法框架/工具
成功解决INFO: pip is looking at multiple versions of keras-preprocessing to determine which version is c
成功解决INFO: pip is looking at multiple versions of keras-preprocessing to determine which version is c
|
数据格式
ValueError: This model has not yet been built. Build the model first by calling `build()` or calling
ValueError: This model has not yet been built. Build the model first by calling `build()` or calling
159 0
ValueError: This model has not yet been built. Build the model first by calling `build()` or calling
|
TensorFlow API 算法框架/工具
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
266 0
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
安装 xgboost 报错ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/fold
安装 xgboost 报错ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/fold
安装 xgboost 报错ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/fold
成功解决 bs4\__init__.py:219: UserWarning: "b'.'" looks like a filename, not markup. You should probably
成功解决 bs4\__init__.py:219: UserWarning: "b'.'" looks like a filename, not markup. You should probably
|
Python
from scipy import special, optimize, from ._nnls import nnls ImportError: DLL load failed: 找不到指定的模块。
from scipy import special, optimize, from ._nnls import nnls ImportError: DLL load failed: 找不到指定的模块。
549 0
from scipy import special, optimize, from ._nnls import nnls ImportError: DLL load failed: 找不到指定的模块。
成功解决model_selection\_search.py:584: DeprecationWarning: "fit_params" as a constructor argument was d
成功解决model_selection\_search.py:584: DeprecationWarning: "fit_params" as a constructor argument was d
成功解决sklearn\grid_search.py:42: DeprecationWarning: This module was deprecated in version 0.18 in fav
成功解决sklearn\grid_search.py:42: DeprecationWarning: This module was deprecated in version 0.18 in fav
成功解决model_selection\_search.py:761: DeprecationWarning: The grid_scores_ attribute was deprecated in
成功解决model_selection\_search.py:761: DeprecationWarning: The grid_scores_ attribute was deprecated in
|
算法框架/工具 Python
成功解决 keras\callbacks.py:999: UserWarning: `epsilon` argument is deprecated and will be removed, use
成功解决 keras\callbacks.py:999: UserWarning: `epsilon` argument is deprecated and will be removed, use