DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`.

Posted a little cabbage

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`.相关的知识,希望对你有一定的参考价值。

问题

F:\\Tools\\Python3.8.9\\lib\\site-packages\\skimage\\morphology\\_skeletonize.py:256: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=np.bool)

解决方法

将F:\\Tools\\Python3.8.9\\lib\\site-packages\\skimage\\morphology_skeletonize.py:256行的np.bool 修改为bool

以上是关于DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`.的主要内容,如果未能解决你的问题,请参考以下文章