def slow_labeled_min(array, labeled): return np.array( [np.min(array * (labeled == i)) for i in range(labeled.max() + 1)])
def slow_labeled_size(labeled): return np.array([np.sum(labeled == i) for i in range(labeled.max() + 1)])
def slow_labeled_size(labeled): return np.array([ np.sum(labeled == i) for i in range(labeled.max()+1) ])
def slow_labeled_min(array, labeled): return np.array([ np.min(array * (labeled == i)) for i in range(labeled.max()+1) ])
def slow_labeled_sum(array, labeled): return np.array( [np.sum(array * (labeled == i)) for i in xrange(labeled.max() + 1)])
def slow_labeled_sum(array, labeled): return np.array([ np.sum(array * (labeled == i)) for i in xrange(labeled.max()+1) ])