运行Python时DeprecationWarning的含义是什么?

时间:2017-07-06 08:57:39

标签: python deprecation-warning

我运行了一个Python程序并获得DeprecationWarning,如:

D:\programs\anaconda2\lib\site-packages\sklearn\utils\deprecation.py:70: DeprecationWarning: Function log_multivariate_normal_density is deprecated; The function log_multivariate_normal_density is deprecated in 0.18 and will be removed in 0.20. 
  warnings.warn(msg, category=DeprecationWarning) 

我无法确认它有什么问题。什么是DeprecationWarning

1 个答案:

答案 0 :(得分:2)

一般情况下,开发人员正在开发库,并且在某些时候开发添加o更改的东西,有时删除主题。删除是危险的,因为用户可能会使用它,如果开发人员想删除某个东西,首先必须通知其他人不要使用此功能,然后他可以删除。和DeprecationWarning就是这个通知。