[0, 0, 0, 0, 0, 0, 0, 0, 0]])
image = labels
if any((buffer_size >= s for s in image.shape)) and mask is None:
// ignore buffer_size if mask
raise ValueError("buffer size may not be greater than image size")
After Change
borders[tuple(slices)] = True
slices[d] = slend
borders[tuple(slices)] = True
slices[d] = slice(None)
// Re-label, in case we are dealing with a binary out
// and to get consistent labeling
labels, number = label(out, background=0, return_num=True)