def make_sorted_frequencies(counts, absolute=False):
 c = sort(counts)
 c = c[c.nonzero()]
 c = c[::(-1)]
 if absolute:
  return c
 else:
  f = (c / float(c.sum()))
  return f

def make_sorted_frequencies ( counts , absolute = False ) : c = sort ( counts ) c = c [ c . nonzero ( ) ] c = c [ : : ( - 1 ) ] if absolute : return c else : f = ( c / float ( c . sum ( ) ) ) return f
transform and sort a vector of count .