[SciPy-user] Performance Python with Weave article updated

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Fri Sep 24 09:08:24 CDT 2004

>>>>> "BC" == Bob Cowdery <Bob.Cowdery at CGI-Europe.com> writes:

    BC> Ok I see the error of my ways, I should have read the article
    BC> more closely!!  I need to expose each array using ArrayType -
    BC> I guess that will make all the difference to the Pyrex time...

Yes, it will make all the difference.  Just FYI, the latest laplace.tar.gz
has Francesc's Pyrex version also.

You should also consider using weave's ext_tools.  Look inside the
weave examples/ directory and look at these examples:

$ grep "import ext_tool" *
fibonacci.py:import ext_tools
increment_example.py:#from weave import ext_tools
increment_example.py:import ext_tools
ramp2.py:from weave import ext_tools
vq.py:    import ext_tools

All of these show you how you can build extension modules from within
Python.  Easiest to see is increment_example.py.  You can create a
module (where you want to create it) and then populate it with a bunch
of functions implemented in C, build it and use it.  Its just a little
more code than usual.  You might want to give it a shot.

Also read this:



More information about the SciPy-user mailing list