module 'numpy' has no attribute 'int'.
原因:np.int 在 NumPy 1.20 中已弃用,在 NumPy 1.24 中已删除
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:

解决方案
将np.int更改为np.int_
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

点击出现错误代码链接会自动跳转到相应numpy.int的位置


再次运行

module 'numpy' has no attribute 'int'.的更多相关文章
- 【Python 数据分析】module 'numpy' has no attribute 'array'
安装好Numpy模块后,开始做了几个小测试都可以运行,但是当我创建numpy.py这个文件后 numpy.py import numpy y = numpy.array([[11,4,2],[2,6, ...
- AttributeError: module 'numpy' has no attribute 'num'
AttributeError: module 'numpy' has no attribute 'num' 写在前面 总的来说,先看看自己用的计算方式是不是写对了先,多个一起使用的话记得都看看 通过想 ...
- AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
/*************************************************************************** * AttributeError: 'modu ...
- Python基础学习-'module' object has no attribute 'urlopen'解决方法
import numpy as npimport urlliburl = "http://archive.ics.uci.edu/ml/machine-learning-databases/ ...
- 解决:pipenv shell报错:AttributeError: 'module' object has no attribute 'run'
利用pipenv shell切换到虚拟环境时,显示报错:AttributeError: 'module' object has no attribute 'run' 可以看到是d:\program\p ...
- 解决Pycharm中matplotlib画图出错问题(AttributeError: module 'matplotlib' has no attribute 'verbose')
最近在Linux中使用pycharm过程中使用matplotlib无法画图,总是提示错误 /usr/bin/python3. /home/leo/PycharmProjects/untitled1/E ...
- module 'cv2' has no attribute 'KNearest_create'
python版本:3.6.5 opencv版本:3.2.0 使用的是jupyter notebook 源代码如下: import cv2 import numpy as np import matpl ...
- python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?
python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- attributeError:'module' object has no attribute ** 解决办法
写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...
随机推荐
- [转]深入HBase架构解析
HBase架构讲解非常清晰的一篇文章,转自 http://www.blogjava.net/DLevin/archive/2015/08/22/426877.htmlhttp://www.blogja ...
- GPTs大受欢迎但问题多,企服软件厂商的AI Agent更被B端客户器重
GPTs大受欢迎但问题多,企服软件厂商的AI Agent更被B端客户器重 比尔盖茨预言智能体是下个平台,超自动化平台的AI Agent更靠谱? 以GPTs为代表的AI Agent只是玩具?揭秘真实可用 ...
- MySQL-char与 varchar 的区别?
版权声明:原创作品,谢绝转载!否则将追究法律责任. ----- 作者:kirin 1.共同点: 都是字符串类型 2.不同点: ①.char类型是定长数据类型.,对于数据插入的速度比较块,在有大量插入需 ...
- 多项目git账户用户名和邮箱设置以及局部github代理
因为公司使用自建的gitlab服务器所以需要配置两个git账户分别用来访问公司仓库和自己的github仓库. 前言: 首先给大家梳理一下多用户名或者说多邮箱使用git的理解误区.我们需要知道的是我们的 ...
- 给 Web 前端工程师看的用 Rust 开发 wasm 组件实战
什么是wasm组件? wasm 全称 WebAssembly,是通过虚拟机的方式,可以在服务端.客户端如浏览器等环境执行的二进制程序.他有速度快.效率高.可移植的特点. 对我们 Web 前端工程最大的 ...
- vertx的学习总结4之异步数据和事件流
一.异步数据和事件流 1.为什么流是事件之上的一个有用的抽象? 2.什么是背压,为什么它是异步生产者和消费者的基础? 3.如何从流解析协议数据? 1. 答:因为它能够将连续的事件序列化并按照顺序进行 ...
- IP交付标准总结。
RTL顶层代码,IP内部需要IP自己完成连接并保证正确,CM/PLL/MCU/SRAM/TX/RX内部模块不接受外部进行拼接,DFT内部自己处理.IP用到的宏,名称功能文档要说明清楚.优先使用硬核IP ...
- 吉特日化MES-日化生产相关设备区分
在化妆品生产过程中约到各种各样的设备,对日化生产设备做一些简单的整理汇总,便于学习(其中设备根据其所在的产品以及领域会有一定的不同) 从产品的角度可以将产品划分为: (1) 乳化剂类产品 (2) 分类 ...
- [ABC246F] typewriter
Problem Statement We have a typewriter with $N$ rows. The keys in the $i$-th row from the top can ty ...
- Python 潮流周刊第 33 期(摘要)
本周刊由 Python猫 出品,精心筛选国内外的 250+ 信息源,为你挑选最值得分享的文章.教程.开源项目.软件工具.播客和视频.热门话题等内容.愿景:帮助所有读者精进 Python 技术,并增长职 ...