原文:https://docs.scipy.org/doc/numpy/reference/generated/numpy.testing.decorators.deprecated.html
校对:(虚位以待)
numpy.testing.decorators.deprecated(conditional=True)[source]在运行测试套件时过滤弃用警告。
这个装饰器可以用于过滤DeprecationWarning的,以避免在测试套件运行期间打印它们,同时检查测试是否实际引发了DeprecationWarning。
| 参数: | conditional:bool或callable,可选
|
|---|---|
| 返回: | 装饰器:function
|
笔记
版本1.4.0中的新功能。