【发布时间】:2018-11-25 16:53:01
【问题描述】:
为什么这段代码 sn-p 会给我这个警告以及如何修复它?
%matplotlib inline
from skimage import io
io.imshow(io.imread('https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png'))
警告:
/home/anaconda3/lib/python3.6/site-packages/skimage/io/_plugins/matplotlib_plugin.py:51: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
out_of_range_float = (np.issubdtype(image.dtype, np.float) and
/home/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_base.py:1400: MatplotlibDeprecationWarning: The 'box-forced' keyword argument is deprecated since 2.2.
" since 2.2.", cbook.mplDeprecation)
我有 skimage 版本 0.13.1。谢谢!
【问题讨论】:
-
你的 IPython 版本是多少?无法在 IPython 6.4.0 中重现。
-
@AndriyMakukha 很奇怪。我也有 IPython 6.4.0。实际上,在我将 skimage 升级到 0.14.0 后,警告就消失了。
标签: image ipython scikit-image