报错:成功解决it will be understood as (type, (1,)) / '(1,)type'._np_quint8 =np.dtype([("quint8", np.uint8)

最近跑了一个有关机器学习的程序,跑出来报错:
import tensorflow总是出现FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’._np_quint8 = np.dtype([(“quint8”, np.uint8, 1)])的错误,感觉是版本的问题,不过很长很影响美观,于是想办法解决一下,看了很多博主的文章,最后找到了解决方法:
把np.dtype([(“quint8”, np.uint8, 1)])修改为np.dtype([(“quint8”, np.uint8, (1,))])就可以快速解决了,如下图:

修改前:
报错:成功解决it will be understood as (type, (1,)) / '(1,)type'._np_quint8 =np.dtype([(
修改后:
报错:成功解决it will be understood as (type, (1,)) / '(1,)type'._np_quint8 =np.dtype([(
终于没有那么多红色错误了,搞定。

你可能感兴趣的:(PyCharm问题)