Adding polynomial fit in python also, and cleaning up indentation for linalg.cpp