FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated; in a future version

红太狼 2022-11-06 11:49 129阅读 0赞

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_resource = np.dtype([(“resource”, np.ubyte, 1)])

警告信息

  1. D:\ProgramData\Anaconda3\envs\mixly_integration\lib\site-packages\tensorflow\python\framework\dtypes.py:528: 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'.
  2. np_resource = np.dtype([("resource", np.ubyte, 1)])

解决办法

  1. pip install -i https://pypi.douban.com/simple numpy==1.14.5

警告原因

  1. Installing collected packages: numpy
  2. Attempting uninstall: numpy
  3. Found existing installation: numpy 1.19.5
  4. Uninstalling numpy-1.19.5:
  5. Successfully uninstalled numpy-1.19.5
  6. Successfully installed numpy-1.14.5

新版numpy中更换了方法,不支持老版本。所以需要对numpy做降版本操作

欢迎大家交流学习,任何问题都可以留言

发表评论

表情:
评论列表 (有 0 条评论,129人围观)

还没有评论,来说两句吧...

相关阅读