回答編集履歴
1
より簡単になるように変更
test
CHANGED
@@ -10,11 +10,13 @@
|
|
10
10
|
|
11
11
|
p, q = a.shape
|
12
12
|
|
13
|
-
for
|
13
|
+
for x in range(0, p, p//n):
|
14
14
|
|
15
|
-
for
|
15
|
+
for y in range(0,q, q//n):
|
16
16
|
|
17
17
|
result.append(a[x:x+p//n, y:y+q//n])
|
18
|
+
|
19
|
+
|
18
20
|
|
19
21
|
print(result)
|
20
22
|
|