例题2.27

例题2.27代码

import numpy as np
a = np.arange(16).reshape(4,4)
b = a[1][2]
c= a[1, 2]
d = a[1:2, 2:3]
x = np.array([0, 1, 2, 1])
print(a[x == 1])


posted @ 2024-10-22 21:54  等我刷把宗师  阅读(2)  评论(0编辑  收藏  举报