Question about scientific calculations in Python

Martin Kaufmann martinkaufmann at yahoo.com
Wed Mar 13 06:54:27 EST 2002


On Tue, 12 Mar 2002 17:01:16 +0000, Fernando Pérez
<fperez528 at yahoo.com> wrote:

>> Do you mean the array calculation of NumPy?
>
>Yes. A quick example (trivially easy, but shows the point):

[helpful introduction into NumPy snipped...]

Thanks. I see the point, but I don't think that it is possible to fit
my problem directly in this solution. At least I know now the
direction I have to go.

>So again, the morale is: at all costs avoid looping in python in 
>performance-critical parts of the code, once you've reached the optimization 
>stage. In those parts, get creative: weave.blitz, weave.inline, 
>weave.ext_tools, SWIG & friends (SILOON, boost, etc) in order of increasing 
>complexity.

Yes, I started playing with weave. The speed looks really impressive.

Many Thanks,

Martin




More information about the Python-list mailing list