Cool Functions

Cool functions. Cool, because they apply operations on numpy array groups in a vectorized way.