[SciPy-user] Performance Python with Weave article updated

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Sep 22 12:48:12 CDT 2004


>>>>> "FA" == Francesc Alted <falted at pytables.org> writes:

    FA> Hi again, I was thinking on why the numarray headers do exist
    FA> on the code that I've sent earlier and I've ended with another
    FA> version. This is simpler, without any need to importing
    FA> Numeric or numarray libraries or headers. This one just
    FA> recognize the object (Numeric or numarray) and access to its
    FA> data buffer.

Neat.  Thanks.

[...]
    FA> Maybe this is a hack, but hey! it "just work". And more
    FA> importantly, it reveals how powerful Pyrex can be by
    FA> effectively mixing Python and C calls.  This can easy a lot
    FA> the transition between Numeric and numarray apps. In fact, it
    FA> would be very easy to write apps that support both Numeric and
    FA> numarray without any conflict and as I said before without
    FA> worrying about library headers or ABI changes.

Pyrex is really cool but I still think that as far as ease of use
goes, weave is hard to beat.  No extension, no new syntax (apart from
C/C++ of course), no need to worry about conversion of data
(typecasting etc.)  and whatnot.  Plus weave works with C++ libraries,
has been extended to work with things like wxWindows, VTK and
arbitrary SWIG'd libraries.  The one thing I'm not sure you can do is
define a new extension type.  I don't believe that there is a
technical issue there.  Only lack of time. 

This is not to take anything away from Pyrex.  I'm excited about it
too.  Its just that there are certain areas where weave really fits
well.

cheers,
prabhu



More information about the SciPy-user mailing list