Via the Daily Python-URL (they should really have permalinks), Interview of Paul F. Dubois of Numeric Python Fame.
Plain Python is perfectly suitable for all ordinary computations, including floating-point calculations. The place where it has a problem is when you have an array calculation, the sort where you would have a big do-loop in Fortran or a for-loop in C. Then the fact that Python is interpreted shows up because such calculations are not as fast as in a compiled language.
Numerical Python is an add-on module that lets you create and manipulate such arrays. Since the array is now an object, processing such as addition, subtraction, or taking a square root can now be done in Numeric's modules, which are written in C. So the loop is still there, but now it is in C and dealing with raw numbers, not in Python and dealing with objects. You get back to within 10% or so of C, and your expression is actually better, being like modern Fortran's array statements, e.g. z = sqrt(x**2 + y**2), rather than a loop with explicit indexing.
The most important fact about Python and Numeric for science is that the language is simple and easy to learn, and resembles other simple languages such as IDL, Matlab, and Fortran, that scientists have found useful and are familiar with. Similar steering projects where the interpreted language was more "computer sciency", such as Scheme or C, have not proven as attractive. The scientists already have a full-time career and so ease of use and a gentle learning curve are crucial. I think Python is now the standard choice for steering scientific programs.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):