最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Python運(yùn)行出現(xiàn)DeprecationWarning的問題及解決

 更新時(shí)間:2022年07月13日 08:42:34   作者:旺?崽  
這篇文章主要介紹了Python運(yùn)行出現(xiàn)DeprecationWarning的問題及解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

Python運(yùn)行出現(xiàn)DeprecationWarning

今天運(yùn)行 py 時(shí)出現(xiàn)下面的問題:

DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working

是這個(gè)語句出現(xiàn)的問題:

from collections import Iterable

好像是 py 版本更新以后包發(fā)生了變化,只需要改一下包名就行:

collections->collections.abc

Python版本問題出現(xiàn)DeprecationWarning

sklearn.cross_validation.cross_val_score()

例如:

from sklearn import cross_validation

D:\Anaconda3\lib\site-packages\sklearn\cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.  "This module will be removed in 0.20.", DeprecationWarning)

改為

from sklearn.model_selection import cross_val_score

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論

榆树市| 德江县| 石河子市| 金沙县| 筠连县| 宾阳县| 南投市| 南投县| 泽库县| 徐闻县| 海盐县| 龙井市| 新郑市| 滦南县| 镇康县| 常德市| 鄂托克旗| 沈丘县| 金平| 两当县| 恩平市| 武汉市| 迁安市| 霞浦县| 沈丘县| 吉林市| 张家界市| 清河县| 莱西市| 林西县| 驻马店市| 中西区| 锡林浩特市| 永丰县| 社会| 临颍县| 隆德县| 安溪县| 永善县| 普兰店市| 新野县|