[SciPy-User] faster expm

josef.pktd@gmai... josef.pktd@gmai...
Sat Oct 30 09:13:09 CDT 2010


On Sat, Oct 30, 2010 at 10:02 AM, Craig Jones <craig.bulk@brechmos.org> wrote:
> Hi All,
>
> I have been using scipy etc for just over a year now and am now exclusively
> using it.  One application I have been doing requires a matrix exponential
> (in lieu of integration).  In Matlab it was very fast but using
> scipy.linalg.expm it is quite slow (as the actual algorithm is implemented
> in python).  In fact about 50% of the code is spent in expm.  My matrix is
> typically 9x9 to 12x12 and is about 50% zeros (most nonzero are along the
> diagonal and just off diagonal).
>
> What I would really like is a faster expm.  I am on a MacBook Pro and use
> Enthought.  I know of things like pyrex, etc.  I was thinking that gsl might
> be good as it is compiled but I was having problems with libraries and gsl.
> Really I just want a solution and don't want to spend time on all these
> things.  The other option, I guess, is to use a Fortran solution and then
> merge that into python.
>
> Has anyone got any ideas faster solutions (both for expm and for me to get
> going :-) ).

Are the other two implementation also slow in your case ?
scipy.linalg.expm2
scipy.linalg.expm3

Josef

>
> Craig
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>


More information about the SciPy-User mailing list