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类型的索引. 网上的解决办法 ...
随机推荐
- SVM(2)-模式识别课堂笔记
三.非线性支持向量机 问题起源:1.对于一些非线性可分的问题,我们希望能通过一个映射问题将特征映射到新的空间中去(可能是更高维的空间),寄希望于在新的空间中样本能够线性可分:2.我们注意到在线性支持向 ...
- linux实用指令 | 程序员线上排查必知必会linux指令(持续更新中)
Linux线上排查程序员实用指南 一.乱码问题 二.帮助指令 1. help命令 2. man命令 3. info命令 三.性能监测与优化 1. top命令 参考资源 Linux线上排查程序员实用指南 ...
- Kafka网络模型和通信流程剖析
1.概述 最近有同学在学习Kafka的网络通信这块内容时遇到一些疑问,关于网络模型和通信流程的相关内容,这里笔者将通过这篇博客为大家来剖析一下这部分内容. 2.内容 Kafka系统作为一个Messag ...
- Arduino系列之按键模块(一)
今天我将简单介绍按键模块计数的原理: 我们常用的按键及按键模块有2脚和4脚的,其内部结构如图所示,当按下按键时就会接通按键两端,当放开时,两端自然断开. ...
- JS刷算法题:二叉树
Q1.翻转二叉树(easy) 如题所示 示例: 输入: 4 / \ 2 7 / \ / \ 1 3 6 9 输出: 4 / \ 7 2 / \ / \ 9 6 3 1 来源:力扣(LeetCode) ...
- web前端sprite,精灵图,雪碧图
css sprite 俗称:精灵图,雪碧图,指将整个页面不同的图片or图标合并在一张图上:优点:使用CSS Sprite 可以减少网络请求,提高网页加载性能,不会出现网页上端加载完毕下面还在加载中这一 ...
- The current test process
样机测试 测试前: 工作内容: 1.需求分析.编写.评审: 项目开工会由项目负责人参加,参加会议时做好笔记,对项目的功能类似,功能模块,测试时间点有个大致的了解. 原始需求进行需求文档细化:按照模块进 ...
- POJ_1376_bfs
题目描述: 给定一个黑白格子的图,黑格子是障碍物,一个线段交点的起点,一个线段交点的终点和初始方向,机器人从起点开始,只能沿着线段,走到终点,期间不能沿着障碍物边缘和墙边缘. 一次操作可以向当前方向走 ...
- ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features! npm WAR ...
- 调用winpcap发送路由器公告
#include <stdlib.h> #include <stdio.h> #include <pcap.h> #pragma comment(lib, &quo ...