当前位置:网站首页>IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boo
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boo
2022-08-02 03:33:00 【woshicaiji12138】
max0=max(val[i][0],val[i][1])min0=min(val[i][0],val[i][1])high[min0]=h+xhigh[max0]=h+xThe following error occurred in the above code when brushing the question today:
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis(None) and integer or boolean arrays are valid indices
The reason is that the index Index cannot be a floating point number, it should be changed to an integer type:
max0=int(max(val[i][0],val[i][1]))min0=int(min(val[i][0],val[i][1]))high[min0]=h+xhigh[max0]=h+x边栏推荐
猜你喜欢

Small program (necessary common sense for development) 1

Scaffolding installation

Redis笔记进阶篇:万字长文-整理Redis,各种知识点,建议收藏

Keil开发环境安装教程

yolov5调用ip摄像头时出现的问题

MySQL中字符串比较大小(日期字符串比较问题)

ModuleNotFoundError No module named ‘xxx‘可能的解决方案大全

Chapter 10 Clustering

(forwarded) HashCode summary (2)

redis进行持久化时,有新的写操作将如何解决——写时复制
随机推荐
构造方法、方法重载、全局变量与局部变量
【程序人生】做了多年的运维,靠什么转行拿下12K+年终奖的薪资?
MySQL常见的索引
支付通道对接常见的问题有哪些?
JSP WebSehll backdoor script
DSPE-PEG-Silane,DSPE-PEG-SIL,磷脂-聚乙二醇-硅烷修饰活性基团
AttributeError: Can't get attribute 'SPPF' on
API 低代码开发:接口大师,一套开发、管理和提供接口的产品框架
线性代数学习笔记2-2:向量空间、子空间、最大无关组、基、秩与空间维数
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boo
Freeswitch操作基本配置
跨域问题解决
浏览器的工作原理(dns域名服务器,tcp握手,ssl/tls安全协议,关键渲染路径,重绘及回流,防抖和节流)
[Remote Control Development Basic Tutorial 3] Crazy Shell Open Source Formation UAV-ADC (Joystick Control)
rem adaptation
MySQL分页查询的5种方法
rem适配
OD-Model [4]: SSD
TRICK第二弹
Problems when yolov5 calls ip camera