【发布时间】:2021-10-01 10:28:50
【问题描述】:
我正在尝试解决 === 帮我解决这个问题
plt.figure(1 , figsize = (15 , 9))
n = 0
for i in range(49):
n += 1
r = np.random.randint(0 , cells.shape[0] , 1)
plt.subplot(7 , 7 , n)
plt.subplots_adjust(hspace = 0.5 , wspace = 0.5)
plt.imshow(cells[r[0]])
plt.title('{} : {}'.format('Infected' if labels[r[0]] == 1 else 'Unifected' ,
labels[r[0]]) )
plt.xticks([]) , plt.yticks([])
plt.show()
排队= r = np.random.randint(0 , cells.shape[0] , 1) 有错误 = ValueError:: low >= high
【问题讨论】:
-
cells中有什么内容?哪一行给出了错误? -
是
cells.shape[0] == 0?