Assistance sought with mondo numerical app

Fernando Pérez fperez528 at yahoo.com
Wed Apr 17 01:50:40 EDT 2002


D. Michael McFarland wrote:

> Fernando Pérez <fperez528 at yahoo.com> writes:
> 
>> This is another one for which weave can be a godsend. The blitz
>> module in weave can for many numeric expressions generate equivalent
>> C++ code which avoids all the intermediate copies. I don't want to
>> sound like a cheerleader (I'm not a developer of weave, only a
>> user), but weave is really amazing in how easily it allows you to
>> integrate Numeric pyhton code with C snippets.
> 
> I played with weave 0.2.3 shortly after that version was released, but
> never got weave.test() to run cleanly.  I said to myself, "Something
> here has great promise," and went back to my old ways of doing
> things.  Should I try the CVS version?

Yes. In fact, the code I'm referring you to here requires the CVS code to work 
(though it could be made to work with the old code). Scipy is shaping up very 
nicely, and the core developers are very close to an updated release in the 
next few weeks.

> 
> Re cheerleading, well, if the student in question hadn't listened to
> my proselytizing about Python, he wouldn't have quite his current
> problem.  (He'd have different and worse problems, but that's another
> post.)
> 
> I've snipped away your mention of example files, but by all means,
> please send me a few.

I've posted it at http://www-hep.colorado.edu/~fperez/python_misc/

Grab the weave_examples.py, and you may also look at the python-c.pdf file 
which has another python/NumPy/weave comparison of the same problem (with a 
factor of 25 speedup between weave and python!).

Let me know if this helps.

Best,

f.



More information about the Python-list mailing list