Skip to content

Commit 584eeff

Browse files
perf: eliminate extra copy in spherical dilate
1 parent 7e919b9 commit 584eeff

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fastmorph/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,9 @@ def spherical_dilate(
214214
labels |= binary_image()
215215
return labels
216216

217-
return labels | binary_image()
217+
binimg = binary_image()
218+
binimg |= labels
219+
return binimg
218220

219221
def spherical_erode(
220222
labels:np.ndarray,

0 commit comments

Comments
 (0)