Factor of 2 in remove added (due to footprint)

This commit is contained in:
Jeremy Metz
2016-02-19 16:16:49 +00:00
parent 8f9a9fa388
commit 0873a6fc9f
+1 -1
View File
@@ -141,7 +141,7 @@ def peak_local_max(image, min_distance=1, threshold_abs=None,
for i in range(mask.ndim):
mask = mask.swapaxes(0, i)
remove = (footprint.shape[i] if footprint is not None
else exclude_border)
else exclude_border*2)
mask[:remove // 2] = mask[-remove // 2:] = False
mask = mask.swapaxes(0, i)