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,))])后,发现这个报错解决了。两种方法都可以尝试一下。
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate;的解决办法的更多相关文章
- 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 ...
- 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 ...
- Eclipse 关于“The type * is not accessible due to restriction on required library”问题的解决办法
The type * is not accessible due to restriction on required library”的错误, 意思是所需要的类库由于受限制无法访问. 解决办法: 1 ...
- Python3 import tensorflow 出现FutureWarning: Passing (type, 1) or '1type' 问题
解决python调用TensorFlow时出现FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate ...
- iphone H5 input type="search" 不显示搜索 解决办法
H5 input type="search" 不显示搜索 解决办法 H5 input type="search" 不显示搜索 解决方法 在IOS(ipad iP ...
- The type R is already defined 错误解决办法
今天在导入一个开源项目的时候遇到了The type R is already defined的错误,试过了删除R,clear project都还是报这个错,Google一下之后找到了解决办法在 Pro ...
- POSTGRESQL中ERROR: recursive query "t" column 2 has type character varying(150) in non-recursive term but type character varying overall
最近在做项目的时候有个需求是需要查到当前登录的用户下辖所有区域的数据,并将查询出来的部门信息以如下格式展示 最高人民法院>江苏省高级人民法院>南通市中级人民法院最高人民法院>江苏省高 ...
- 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 ...
- #1214 - The used table type doesn't support FULLTEXT indexes解决办法
#1214 - The used table type doesn't support FULLTEXT indexes报此错误的原因是:InnoDB不支持FULLTEXT类型的索引. 网上的解决办法 ...
随机推荐
- 大数据面试题(一)----HADOOP 面试题
1. 下列哪项通常是集群的最主要瓶颈(C) A. CPU B. 网络 C. 磁盘IO D. 内存 2. 下列哪项可以作为集群的管理工具?(C) A.Puppet B.Pdsh C.ClouderaMa ...
- Oracle 数据库 回滚
1.打开Flash存储的权限ALTER TABLE authorization ENABLE row movement ;2.把表还原到指定时间点flashback table authorizati ...
- Rabbitmq | ConnectionException:Connection refused: connect
案例 今天完成了Rabbitmq的搭建,调用本地mq服务器是可以的,但是在本地调用远程mq发现出现了connectionException异常,使用的是默认端口5672,具体情况如下图 解决方案 修改 ...
- python 学习笔记2 匿名函数
# 匿名函数 lambda a,b : a+b# a.j.from functools import reduce students = [{'name': '张三', 'age': 18, 'hei ...
- C++对于C故有问题的改进
C++继承了所有的C特性,并且提供了更丰富的语法和特性(OOP支持.模板支持等),并且拥有和C语言同样出色的运行效率.针对C语言的固有问题,C++做出了如下的升级: 所有变量都可以在需要使用时再定义( ...
- Spring基于注解配置AOP
D:\Java\IdeaProjects\JavaProj\SpringHelloWorld\src\aop.xml <?xml version="1.0" encoding ...
- 【WPF学习】第四十章 画刷
画刷填充区域,不管是元素的背景色.前景色以及边框,还是形状的内部填充和笔画(Stroke).最简单的画刷类型是SolidColorBrush,这种画刷填充一种固定.连续的颜色.在XAML中设置形状的S ...
- 2019icpc南京网络赛 A The beautiful values of the palace(离线+树状数组)
题意: (假设所有的点对应的值已经求出)给你一个1e6*1e6的矩阵,有m<=1e5个点有值,其余都为0 q<=1e5个询问,求子矩阵的权值和 思路: 根据二维差分,对于询问左下角(x1, ...
- 突破CRUD | 万能树工具类封装
0.学完本文你或许可以收获 感受一个树工具从初始逐步优化完善的过程 树工具封装的设计思考与实现思路 最后收获一款拿来即用的树工具源代码 对于前端树组件有一定了解和使用过的同学可直接跳跃到第3章节开始. ...
- urllib 模块 - module urllib
urllib 模块 - urllib module 获取 web 页面, html = urllib.request.urlopen("http://www.zzyzz.top/" ...