def _ezclump(mask):
<EOL>if mask.ndim > <NUM_LIT:1>:<EOL><INDENT>mask = mask.ravel()<EOL><DEDENT>idx = (mask[<NUM_LIT:1>:] ^ mask[:-<NUM_LIT:1>]).nonzero()<EOL>idx = idx[<NUM_LIT:0>] + <NUM_LIT:1><EOL>slices = [slice(left, right)<EOL>for (left, right) in zip(itertools.chain([<NUM_LIT:0>], idx),<EOL>itertools.chain(idx, [len(mask)]),)]<EOL>return slices<EOL>
Finds the clumps (groups of data with the same values) for a 1D bool array.

Returns a series of slices.