skimage有关数据类型的警告

时间:2018-08-17 20:57:22

标签: image ipython scikit-image

为什么此代码段会向我发出此警告以及如何解决?

%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。谢谢!

1 个答案:

答案 0 :(得分:0)

警告是由于在scikit-image 0.13.1之后发布的NumPy和Matplotlib版本中弃用的。如评论中所述,升级到0.14可以解决此问题。