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类型的索引. 网上的解决办法 ...
随机推荐
- spring源码系列(十): 读取xml入口类 ClassPathXmlApplicationContext 分析
环境准备: 使用spring5.1.6版本 1 xml配置文件 <?xml version="1.0" encoding="UTF-8"?> < ...
- Oracle:imp导入dmp文件
oracle命令行登录 sqlplus / as sysdba 创建用户 create user 用户 identified by 密码 ; 创建表空间 create tablespace 表空间名 ...
- (数据科学学习手札75)基于geopandas的空间数据分析——坐标参考系篇
本文对应代码已上传至我的Github仓库https://github.com/CNFeffery/DataScienceStudyNotes 1 简介 在上一篇文章中我们对geopandas中的数据结 ...
- 关于centos7下networkManager关闭操作
由于network和NetworkManager服务会出现冲突,而且NetworkManager通常会比较先启动,所以为了防止NetworkManager的启动导致我们直接配置的网络环境失效,我们需要 ...
- 使用IntelliJ IDEA创建Maven工程
1. 新建项目(点击“+ Create New Project”): 2. 选择Maven,不必选择项目骨架,直接点击Next 按钮即可: 3. 输入项目名称,选择项目位置,输入组织名称,模块名称,项 ...
- 大牛给的ACM进阶建议
转:https://blog.csdn.net/mmy1996/article/details/56011084 来自知乎 在他后面的回答中发现 不用IDE ,修炼内功挺好的,不过他和我的以前的那种 ...
- Codeforces_101498
A.map统计数量,更新最大值. #include<bits/stdc++.h> using namespace std; int n; map<int,int> mp; in ...
- WeChall_PHP 0817 (PHP, Exploit)
I have written another include system for my dynamic webpages, but it seems to be vulnerable to LFI. ...
- Java7循环结构综合练习
import java.util.Scanner; public class jh_01_学员操作_选择游戏 { public static void main(String[] args) { Sc ...
- MySQL复制(四)—多源(主)复制
(一)多主复制概述 MySQL从5.7版本开启支持多主复制,所谓多主复制,是将多个主库的数据复制到一个从库中.通常用于数据仓库整合数据,比如OLTP系统为了分散业务压力,对数据库进行分库分表,当要对数 ...