[SciPy-dev] Weave - strange behaviour
prabhu at aero.iitm.ernet.in
Wed Sep 22 12:33:07 CDT 2004
>>>>> "MM" == Manuel Metz <mmetz at astro.uni-bonn.de> writes:
MM> Hi, I was really excited about weave. But I found a (to me)
MM> somewhat strange behaviour, which I do not understand. I used
MM> the following code to test weave:
MM> And it seams that EACH time I call the function the C-code
MM> gets compiled. This behavior also showed up depending on the
MM> first line of the C-code (line break or not; additionen
MM> Has anyone else seen this? Any idea what is going wrong? How
MM> can I prevent this strange behaviour (except try and error)?
I haven't tested your script but usually wipe out my cache and catalog
if I run into any wierdness. Its usually stored in
~/.python23_compiled. Do an rm -rf in that directory and rerun, it
should hopefully work.
I think the problem is with the catalog. Perhaps the hash fails or is
confused for some reason. I'm not sure.
Weave is an amazing tool but it looks like it needs more community
support. I don't think Eric has enough time on his hands to spend on
it. I know that given the chance he'd love to work on it, but there
are only 24 hours in a day.
I personally don't know my way well enough with the code except for
extending it a little here and there and adding support for VTK and
SWIG2. I will try and add a few examples for these when I get the
chance. However, I am already spread quite thin.
Overall there are a few things that definitely need work.
1. Fixing the small bugs, like this one you mention.
Both are painful.
On 2. perhaps a simple wiki page with user examples would help. I'm
sure Fernando has several. I can add a few myself. However, the
basic docs (like the weave user guide) would need our weave guru,
I also think that weave really shines when it comes to pure Python
code-acceleration. The performance Python article clearly
demonstrates its power, ease and simplicity (from the users
It would be cool if weave could actually be used as the engine to
build any extension module from within Python (using f2py, pyrex, or
with its own Numeric magic). That way you could embed
C/C++/Fortran/Pyrex code into your Python code, depending on what you
are comfortable with. I'm sure Eric has other cool ideas too.
More information about the Scipy-dev