def _cluster_mask_to_indices(components):
 for (ci, c) in enumerate(components):
  if (not isinstance(c, slice)):
   components[ci] = np.where(c)[0]
 return components

def _cluster_mask_to_indices ( components ) : for ( ci , c ) in enumerate ( components ) : if ( not isinstance ( c , slice ) ) : components [ ci ] = np . where ( c ) [ 0 ] return components
convert to the old format of clusters .