踩坑场景

报错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,))])后,发现这个报错解决了。两种方法都可以尝试一下。

FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate;的解决办法的更多相关文章

  1. Numpy版本问题,import tensorflow as tf 报警:“ 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'”

    tensorflow成功安装后 import tensorflow as tf 报警:“ FutureWarning: Passing (type, 1) or '1type' as a synony ...

  2. FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated;

    /Users/jerryqi/PycharmProjects/DeepLearning/venv/lib/python3.7/site-packages/tensorflow/python/frame ...

  3. Eclipse 关于“The type * is not accessible due to restriction on required library”问题的解决办法

    The type * is not accessible due to restriction on required library”的错误, 意思是所需要的类库由于受限制无法访问. 解决办法: 1 ...

  4. Python3 import tensorflow 出现FutureWarning: Passing (type, 1) or '1type' 问题

    解决python调用TensorFlow时出现FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate ...

  5. iphone H5 input type="search" 不显示搜索 解决办法

    H5 input type="search" 不显示搜索 解决办法 H5 input type="search" 不显示搜索 解决方法 在IOS(ipad iP ...

  6. The type R is already defined 错误解决办法

    今天在导入一个开源项目的时候遇到了The type R is already defined的错误,试过了删除R,clear project都还是报这个错,Google一下之后找到了解决办法在 Pro ...

  7. POSTGRESQL中ERROR: recursive query "t" column 2 has type character varying(150) in non-recursive term but type character varying overall

    最近在做项目的时候有个需求是需要查到当前登录的用户下辖所有区域的数据,并将查询出来的部门信息以如下格式展示 最高人民法院>江苏省高级人民法院>南通市中级人民法院最高人民法院>江苏省高 ...

  8. ResourceWarning: unclosed <socket.socket fd=864, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('10.100.x.x', 37321), raddr=('10.1.x.x', 8500)>解决办法

    将代码封装,并使用unittest调用时,返回如下警告: C:\python3.6\lib\collections\__init__.py:431: ResourceWarning: unclosed ...

  9. #1214 - The used table type doesn't support FULLTEXT indexes解决办法

    #1214 - The used table type doesn't support FULLTEXT indexes报此错误的原因是:InnoDB不支持FULLTEXT类型的索引. 网上的解决办法 ...

随机推荐

  1. 解决git报错:error: RPC failed; curl 18 transfer closed with outstanding read data remaining 的方法

    报错信息: error: RPC failed; curl 18 transfer closed with outstanding read data remainingfatal: the remo ...

  2. Ubuntu解决 MariaDB无密码就可以登录的问题

    使用apt-get来安装mysql,安装好之后发现安装的是 MariaDB,如下,无需密码既可以登录了.即使使用mysqladmin或mysql_secure_installation 设置好密码,用 ...

  3. 12、PPP和HDLC

    PPP主要包括三个部分1.    在串行链路上封装上层数据报文的方法2.    LCP(link control protocals): 链路控制协议来配置和测试数据通信链路,协商PPP协议的配置参数 ...

  4. pip install 提示:OSError: [Errno 13] 权限不够:

    使用pip install 安装时报错: OSError: [Errno 13] 权限不够: 解决方法:1.加sudo. 2.pip install packagename --user,只为当前用户 ...

  5. Go语言实现:【剑指offer】构建乘积数组

    该题目来源于牛客网<剑指offer>专题. 给定一个数组A[0,1,-,n-1],请构建一个数组B[0,1,-,n-1],其中B中的元素B[i]=A[0] * A[1] * - * A[i ...

  6. 五种编程语言解释数据结构与算法——顺序表1(理论与C语言实现)

    1.线性表的分类 2.线性表的定义及其基本操作 2.1.定义:线性表是具有相同类型的n(n>=0)个元素的有序序列,其中n为表长,当n=0时,该表为空表. 2.3.线性表的逻辑结构为: 2.4. ...

  7. java中list的sort()功能如何使用?

    排序时正序/倒序处理起来可能会混淆,可以用更简单的方法.可以使用java.util自带的比较器来做 Comparator.comparingInt(Integer::intValue).reverse ...

  8. Classmethod and Staticmethod - Python 类方法 和 静态方法

    classmethod and staticmethod classmethod 的是一个参数是类对象 cls (本类,或者子类), 而不是实例对象 instance (普通方法). classmet ...

  9. onboard procossor and cross-compile

    星载处理器 ERC32-TSC695F The European Space Agency’s ERC32 is a microprocessor implementing a SPARC V7 pr ...

  10. Windows+Python+Selenium基础篇之1-环境搭建

    1.所需工具包1.1Selenium for python1.2  Python  1.3  Notepad++或python IDE 2.  环境搭建2.1  下载和安装Pythonpython2. ...