老版本的代码在新版本中无法运行,有人能看下这一行什么意思以及应该怎么修改么?
问题描述:
出错位置在第三十行。height width已定义。报错信息为: only integers, slices (
:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indices
答
切片需要是整型数据的 可以试试将 除号/ 换成// 取整