zoukankan      html  css  js  c++  java
  • FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate;的解决办法

    踩坑场景

    报错FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate;

    解决办法

    1.升级numpy的版本

    pip uninstall numpy
    pip install numpy==1.16.4
    

    2.将报错的部分修改

    若升级numpy的版本无效,则将将np.dtype([("quint8", np.uint8, 1)])
    修改为np.dtype([("quint8", np.uint8, (1,))]),建议用修改后的写法

    np.dtype([("quint8", np.uint8, (1,))])
    

    我一开始试过第一种方法,一开始是可以解决这个报错的,但有一次在别的电脑也尝试第一种方法的时候,解决不了,然后我将np.dtype([("quint8", np.uint8, 1)])修改为np.dtype([("quint8", np.uint8, (1,))])后,发现这个报错解决了。两种方法都可以尝试一下。

  • 相关阅读:
    MySQL 5.7.18 zip 文件安装过程
    Mysql 自定义随机字符串
    JAVA基本类型和引用类型
    初识JSP
    Java导出错误数据
    时序图的使用习惯
    Redis踩坑
    ES踩坑
    代码规范
    Git在公司的使用流程
  • 原文地址:https://www.cnblogs.com/windowsxpxp/p/11527073.html
Copyright © 2011-2022 走看看