Kevin Jacobs <email@example.com>
Fri Jul 20 13:45:43 CDT 2007
On 7/20/07, Nils Wagner <firstname.lastname@example.org> wrote:
> Your sqrtm_eig(x) function won't work if x is defective.
> See test_defective.py for details.
I am aware, though at least on my system, the SVD-based method is by far the
fastest and robust (and can be made more robust by the addition of a
relative condition number threshold). The eig version was included mainly
Have you considered the algorithms proposed by
> Nick Higham for various matrix functions ?
Yep. He is one of my heros. The downside is that direct Python
implementations of many of his algorithms will almost always be
significantly slower than using algorithms that leave the heavy-lifting to
LAPACK. This is certainly the case for the current sqrtm and expm code.
Even in the Python domain, there is significant room to optimize the current
sqrtm implementation, since one of the key inner loops can be trivially
vectorized. I'll certainly give that a shot and add it to my next round of
benchmarks. However, I'm not sure that I want to commit to going to the
next level by developing and maintaining a C implementation of sqrtm. While
it has the potential to achieve near-optimal performance for that method, we
may be reaching the point of diminishing returns for my needs. I certainly
won't complain if someone else is willing to do so.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion