Python:numpy 1.19.4 没有名为 numpy.testing.decorators 的模块

Python: No module named numpy.testing.decorators for numpy 1.19.4

我最近在安装另一个新模块时将我的 numpy 更新到版本 1.19.4 并将我的 scipy 更新到 1.5.4。

我现在收到一条错误消息:

from numpy.testing.decorators import slow #noqa
>>> ModuleNotFoundError: No module named 'numpy.testing.decorators'

我不确定如何解决这个问题。跟更新有关系吗?

我在 Anaconda 中使用 Spyder

对于 numpy 版本 1.19.4 装饰器现在位于 ._private

from numpy.testing._private.decorators import slow

应该可以