warnings模块 : 忽略warning警告错误

当遇到一些不影响程序运行的警告的时候,为了好看或者不想看到警告,可以采用warnings模块忽略warning。

 

import warnings
warnings.filterwarnings("ignore")

posted @ 2022-01-30 16:35  夙兴夜寐  阅读(270)  评论(0)    收藏  举报