I have just ported some C++ code to Python for PDE + Method of Lines + scipy.odeint for Black Scholes so as to get some hands-on feeling. Some
initial impressions:
- The code is easy to port (algorithmic code is almost 1:1).
- I find Python 'layout' style quite quirky. Reminds me of Fortran IV in some ways.
- Very easy to prototype 'proof of concept' algorithms.
- The run-time code is inefficient (BTW I have not tried to optimize the code, even then it is not clear how I would do this).
- Looking into crystal ball and extrapolating: large Python code base will in all probably be difficult to maintain and/or reuse. But maybe this is not one of Python's goals.
- Using Python is an effective means to learn PDE/FDM and more generally, numerical algorithms.
Now I see why Python libraries wrap Fortran/C/C++ code.