回答編集履歴
1
コードの変更
test
CHANGED
@@ -12,19 +12,21 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
+
arr = np.arange(10)
|
16
|
+
|
15
|
-
print(
|
17
|
+
print(arr.shape)
|
16
18
|
|
17
19
|
# (10,)
|
18
20
|
|
19
21
|
|
20
22
|
|
21
|
-
print(
|
23
|
+
print(arr[:, None].shape)
|
22
24
|
|
23
25
|
# (10, 1)
|
24
26
|
|
25
27
|
|
26
28
|
|
27
|
-
print(
|
29
|
+
print(arr[None, :].shape)
|
28
30
|
|
29
31
|
# (1, 10)
|
30
32
|
|