我有一些使用 numpy 的 python 代码,并且已经成功运行了一年或更长时间。我上周突然收到以下错误:
/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:2507: VisibleDeprecationWarning: `rank` is deprecated; use the `ndim` attribute or function instead. To find the rank of a matrix see `numpy.linalg.matrix_rank`.
VisibleDeprecationWarning)
我在网上找不到太多信息,但我发现这是由于旧版本的 scipy 中的错误造成的(尽管我的代码实际上并没有直接使用 scipy)。我已经使用 numpy 1.9.2 和 scipy 0.15.1 升级到 python 2.7.9,但是我仍然遇到同样的错误。我不确定是什么原因造成的,或者我如何解决这个问题。