parameters: (mask)
return_statement: return slices
docstring: Finds the clumps (groups of data with the same values) for a 1D bool array.
  
      Returns a series of slices.
docstring_summary: Finds the clumps (groups of data with the same values) for a 1D bool array.
docstring_tokens: Finds the clumps ( groups of data with the same values ) for a 1D bool array .
function: def _ezclump(mask):
      """
      Finds the clumps (groups of data with the same values) for a 1D bool array.
  
      Returns a series of slices.
      """
      #def clump_masked(a):
      if mask.ndim > 1:
          mask = mask.ravel()
      idx = (mask[1:] - mask[:-1]).nonzero()
      idx = idx[0] + 1
      slices = [slice(left, right)
                for (left, right) in zip(itertools.chain([0], idx),
                                         itertools.chain(idx, [len(mask)]),)]
      return slices
function_tokens: def _ezclump ( mask ) : #def clump_masked(a): if mask . ndim > 1 : mask = mask . ravel ( ) idx = ( mask [ 1 : ] - mask [ : - 1 ] ) . nonzero ( ) idx = idx [ 0 ] + 1 slices = [ slice ( left , right ) for ( left , right ) in zip ( itertools . chain ( [ 0 ] , idx ) , itertools . chain ( idx , [ len ( mask ) ] ) , ) ] return slices