else:
if output.dtype != bool:
raise TypeError("mahotas.labeled.border: output must be boolean")
if not output.flags["C_CONTIGUOUS"]:
raise TypeError("mahotas.labeled.border: output must be C-contiguous")
if output.shape != labeled.shape:
raise ValueError("mahotas.labeled.border: output must be of same size as `labeled`")