📌  相关文章
📜  grid_data=d.iloc[index].as_matrix( ).reshape(28,28) 不起作用 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:36.443000             🧑  作者: Mango

代码示例1
# display or plot a number.
plt.figure(figsize=(7,7))
idx = 100

grid_data = d.iloc[idx].as_matrix().reshape(28,28) # reshape from 1d to 2d pixel array
plt.imshow(grid_data, interpolation = "none", cmap = "gray")
plt.show()

print(l[idx])