Python Finite Difference Method