def dilate(y):
mask = ndimage.generate_binary_structure(2, 2)
y_f = ndimage.binary_dilation(y, structure=mask).astype(y.dtype)
return y_f
##########################
### Array routine Operation
##########################
文章目录