回答編集履歴
4
追記2
test
CHANGED
@@ -99,3 +99,41 @@
|
|
99
99
|
"""
|
100
100
|
|
101
101
|
```
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
# 追記2
|
108
|
+
|
109
|
+
これをどう動くと認識しているのでしょうか。
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
```python
|
114
|
+
|
115
|
+
A = [[1, 2],
|
116
|
+
|
117
|
+
[3, 4]]
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
for line in A:
|
122
|
+
|
123
|
+
for x in line:
|
124
|
+
|
125
|
+
print(x)
|
126
|
+
|
127
|
+
""" =>
|
128
|
+
|
129
|
+
1
|
130
|
+
|
131
|
+
2
|
132
|
+
|
133
|
+
3
|
134
|
+
|
135
|
+
4
|
136
|
+
|
137
|
+
"""
|
138
|
+
|
139
|
+
```
|
3
追記
test
CHANGED
@@ -62,13 +62,17 @@
|
|
62
62
|
|
63
63
|
for ax, C in zip(axes, [-1, 0, 3]):
|
64
64
|
|
65
|
-
|
65
|
+
print("C:", C, "ax:", ax)
|
66
66
|
|
67
|
+
for a, gamma in zip(ax, range(-1, 2)):
|
68
|
+
|
67
|
-
print(C, gamma, a)
|
69
|
+
print(C, gamma, a)
|
68
70
|
|
69
71
|
|
70
72
|
|
71
73
|
""" =>
|
74
|
+
|
75
|
+
C: -1 ax: [0 1 2]
|
72
76
|
|
73
77
|
-1 -1 0
|
74
78
|
|
@@ -76,11 +80,15 @@
|
|
76
80
|
|
77
81
|
-1 1 2
|
78
82
|
|
83
|
+
C: 0 ax: [3 4 5]
|
84
|
+
|
79
85
|
0 -1 3
|
80
86
|
|
81
87
|
0 0 4
|
82
88
|
|
83
89
|
0 1 5
|
90
|
+
|
91
|
+
C: 3 ax: [6 7 8]
|
84
92
|
|
85
93
|
3 -1 6
|
86
94
|
|
2
追記
test
CHANGED
@@ -47,3 +47,47 @@
|
|
47
47
|
|
48
48
|
|
49
49
|
この解釈は個人的には意味不明です。
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
# 追記
|
54
|
+
|
55
|
+
```python
|
56
|
+
|
57
|
+
import numpy as np
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
axes = np.arange(9).reshape(3, 3)
|
62
|
+
|
63
|
+
for ax, C in zip(axes, [-1, 0, 3]):
|
64
|
+
|
65
|
+
for a, gamma in zip(ax, range(-1, 2)):
|
66
|
+
|
67
|
+
print(C, gamma, a)
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
""" =>
|
72
|
+
|
73
|
+
-1 -1 0
|
74
|
+
|
75
|
+
-1 0 1
|
76
|
+
|
77
|
+
-1 1 2
|
78
|
+
|
79
|
+
0 -1 3
|
80
|
+
|
81
|
+
0 0 4
|
82
|
+
|
83
|
+
0 1 5
|
84
|
+
|
85
|
+
3 -1 6
|
86
|
+
|
87
|
+
3 0 7
|
88
|
+
|
89
|
+
3 1 8
|
90
|
+
|
91
|
+
"""
|
92
|
+
|
93
|
+
```
|
1
投稿ミス
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
たとえばこの二重`for`は普通にわかりますか? わかれば大丈夫です。質問文のも理解できます。
|
6
6
|
|
7
7
|
|
8
8
|
|
@@ -39,3 +39,11 @@
|
|
39
39
|
"""
|
40
40
|
|
41
41
|
```
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
> 「iの一番目の要素についてjの要素全てを順に適用していく」
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
この解釈は個人的には意味不明です。
|