【问题标题】:skimage warning about data type关于数据类型的 skimage 警告
【发布时间】: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


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2019-02-28
    • 1970-01-01
    • 2020-04-22
    • 2016-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-29
    • 1970-01-01
    相关资源
    最近更新 更多