回答編集履歴
1
追記
test
CHANGED
@@ -24,6 +24,20 @@
|
|
24
24
|
|
25
25
|
[0, 1, 0]]
|
26
26
|
|
27
|
+
|
28
|
+
|
29
|
+
filtered = ndimage.maximum_filter(A, footprint=FP)
|
30
|
+
|
31
|
+
print(filtered)
|
32
|
+
|
33
|
+
# [[ 3 10 10 10]
|
34
|
+
|
35
|
+
# [ 9 6 10 6]
|
36
|
+
|
37
|
+
# [ 9 9 7 7]]
|
38
|
+
|
39
|
+
|
40
|
+
|
27
41
|
out = A[ndimage.maximum_filter(A, footprint=FP) == A]
|
28
42
|
|
29
43
|
|