[Numpy-discussion] matlab vs. python question

Brian Blais bblais@bryant....
Wed Apr 25 19:28:46 CDT 2007


Christopher Barker wrote:
> Sturla Molden wrote:
>> It is 
>> also easier to write C or Fortran extensions for Matlab than for Python.
> 
> Really? I"m not so sure about that -- I found mex file writing pretty 
> painful.
> 
> With weave, boost, pyrex, swig, f2py, etc, the hardest thing about 
> writing extensions for Python is choosing which tool to use!
> 

I agree with Sturla here, up until Pyrex.  Looking at the Python API, swig, f2py,
etc. I found mex files far more straightforward.  Mostly this is because of the
(mostly) single datatype in Matlab: the double matrix.  Having to do reference
counting in the Python API is a drag.

Now, with Pyrex, that's a different matter entirely.  Pyrex makes extension writing
so incredibly easy, its one of the major reasons I switched from Matlab to Python.

I'm trying to convince some people at work to explore Python as a Matlab replacement.
    If all you do is numerics, then Matlab is easier (by a little).  Once you go
beyond numerics (which you do for any real project), like reading datafiles,
interfacing with the Internet, accessing databases, etc... suddenly Python is a *lot*
nicer.

			bb

-- 
-----------------

              bblais@bryant.edu
              http://web.bryant.edu/~bblais



More information about the Numpy-discussion mailing list