作者ttfor (ttfor)
看板Python
标题[问题] Numpy VisibleDeprecationWarning
时间Sat Mar 26 16:14:41 2016
大家好,我在使用 numpy 的时候遇到了一个问题,警告讯息如下:
/usr/local/lib/python3.4/dist-packages/numpy/core/fromnumeric.py:2645:
VisibleDeprecationWarning: `rank` is deprecated; use the `ndim` attribute or function instead.
To find the rank of a matrix see `numpy.linalg.matrix_rank`. VisibleDeprecationWarning)
爬了文发现是因为 numpy 1.10 之後为舍弃 rank 这个名称,改叫 ndim,
但我的程式码中并没有直接用到 np.rank(),推测是某个 numpy function 会自己呼叫到 np.rank() 造成这个警告。
因此我将所有可能与 numpy 有关的 package(numpy, sklearn, scipy) 都升级到最新,但还是无法解决。
想请问各位是否知道该如何解决?谢谢大家!
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.114.77.13
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1458980084.A.6B0.html
※ 编辑: ttfor (140.114.77.13), 03/26/2016 16:15:26
1F:推 fischcheng: 阿就是warning 不需要解决,以後注意不要用而已。 03/26 23:04