Solving Heat Equation In Python