第二次作业来咯
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import numpy as np
|
||||
|
||||
a = np.arange(2 * 3 * 4).reshape(2, 3, 4)
|
||||
a = np.arange(24).reshape(2, 3, 4)
|
||||
|
||||
b = np.arange(12).reshape(2, 6)
|
||||
b = np.arange(12).reshape(3, 4)
|
||||
|
||||
c = a + b.reshape(2, 3, 4)
|
||||
c = a + b
|
||||
|
||||
c_flattened = c.flatten(copy=True)
|
||||
flattened_c = c.flatten().copy()
|
||||
|
||||
print("a\n", a)
|
||||
print("b\n", b)
|
||||
print("c\n", c)
|
||||
print("c_flattened\n", c_flattened)
|
||||
print("矩阵 a:\n", a)
|
||||
print("\n矩阵 b:\n", b)
|
||||
print("\n矩阵 c(a + b):\n", c)
|
||||
print("\n展平后的矩阵 c:\n", flattened_c)
|
||||
|
||||
Reference in New Issue
Block a user