1
0
This commit is contained in:
2024-12-28 12:50:41 +08:00
parent 150cd78949
commit 6361618c8e
13 changed files with 289 additions and 5760 deletions

17
test/outputtest.py Normal file
View File

@@ -0,0 +1,17 @@
import numpy as np
# 创建一个二维数组
array = np.array([[1, 2, 3], [4, 5, 6]])
# 对整个数组求和
total_sum = np.sum(array)
# 对每一列求和
column_sum = np.sum(array, axis=0)
# 对每一行求和
row_sum = np.sum(array, axis=1)
print("总和:", total_sum)
print("列和:", column_sum)
print("行和:", row_sum)