原文:
for n, x in enumerate(X):
j = n // nw
i = n % nw
img[jh:jh+h, iw:iw+w] = x
改为:
for n, x in enumerate(X):
j = n // nw
i = n % nw
img[int(jh):int(jh+h), int(iw):int(iw+w)] = x
错误提示:TypeError: slice indices must be integers or None or have an __index__ method
最新推荐文章于 2023-05-09 23:49:53 发布