Python Numerical Methods