Files
task-3-1-3-Matrix-Fundament…/06 林伟泰.py
2026-04-16 16:00:01 +08:00

14 lines
210 B
Python

# 一维数组(向量)
vec = np.array([1, 2, 3, 4, 5])
print(vec) # [1 2 3 4 5]
# 二维数组(矩阵)
mat = np.array([
[1, 2, 3],
[4, 5, 6]
])
print(mat)
# [[1 2 3]
# [4 5 6]]