当前位置:网站首页>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边栏推荐
猜你喜欢

MySQL中JOIN的用法

(forwarded) HashCode summary (2)

Small program (necessary common sense for development) 1

bgp机房的动态路由和静态路由的区别

subprocess.CalledProcessError: Command 'pip install 'thop'' returned non-zero exit status 1.

云服务器安装部署Nacos2.0.4版本

青蛙跳台阶:我如何得知它是一道斐波那契数列题?——应用题破题“三板斧”

redis进行持久化时,有新的写操作将如何解决——写时复制

About cross-domain issues

MySQL分库分表
随机推荐
subprocess.CalledProcessError: Command 'pip install 'thop'' returned non-zero exit status 1.
小程序组件总结
yolov5调用ip摄像头时出现的问题
@ApiModel 和 @ApiModelProperty
Redis简单学习笔记
Keil development environment installation tutorial
云服务器安装部署Nacos2.0.4版本
Week 7 Review
连接数据库时遇到的bug1号
通过PS 2021 将网页图标抠下来
Double Strings (don't always forget substr)
Keil开发环境安装教程
getattr()函数解析
OD-Model【4】:SSD
parser = argparse.ArgumentParser() parsing
mysql中exists的用法详解
STL entry basics map and set containers
手把手带你 Unity 入门之从零创建一个时钟(GameObjects 与 Scripts)
Cloud server installation and deployment of Nacos 2.0.4 version
【深度学习】从LeNet-5识别手写数字入门深度学习