您当前的位置: 首页 >  Python

星拱北辰

暂无认证

  • 0浏览

    0关注

    1205博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

【Python】AttributeError: module ‘numpy’ has no attribute ‘unit8’ 的解决方法

星拱北辰 发布时间:2020-09-26 19:18:29 ,浏览量:0

经排查,下面的一行代码出了异常:

mask2 = np.where((mask1 == 2) | (mask1 == 0), 0, 1).astype('unit8')

异常类型是:

AttributeError: module ‘numpy’ has no attribute ‘unit8’

无非就是uint8写成了unit8。 这个错误其实还算挺low的,但也不是不可能出现。 希望别手抖或是惯性思维吧,加油。

关注
打赏
1660750074
查看更多评论
立即登录/注册

微信扫码登录

0.0405s