Added API functions; optional return of numpy array

Added transformations, and row returns. Also added option of returning a
numpy array instead of a pandas ts.