generate linspaced numpy.array from date/time range

cleaned up other analytics functions, added compatibility with numpy.
pep8 style cleanup