scipy/scipy — pull request #2974 by argriffing (2013-10-10 18:39:31+00:00)
Title: ENH: Alex Leach's wrapper of Roger Sidje's EXPOKIT

Add the EXPOKIT wrapper, with some benchmark and testing code.

Through testing I've found that the expm provided by the wrapper fails for a matrix full of zeros (causing a fortran `stop`) and for the following matrix mentioned by Cleve Moler (returning a matrix full of `nan`s).
http://blogs.mathworks.com/cleve/2012/07/23/a-balancing-act-for-the-matrix-exponential/

My benchmark times were a lot faster than the ones reported in https://github.com/scipy/scipy/pull/354. I'm on some 6-core Xeon with openblas, which I would have thought would be comparable to the system used for the other benchmarks. Maybe I am doing the timings wrong, or maybe the numbers reported in the other PR were using a fake BLAS or LAPACK instead of actually using MKL.

```
Times averaged over 1000 iterations
Array size EXPOKIT times SciPy times
5 0.000 += 0.000 0.002 += 0.000
10 0.000 += 0.000 0.002 += 0.001
15 0.000 += 0.000 0.003 += 0.002
20 0.000 += 0.001 0.003 += 0.001
25 0.000 += 0.000 0.003 += 0.001
30 0.000 += 0.000 0.003 += 0.001
35 0.000 += 0.001 0.004 += 0.001
40 0.000 += 0.000 0.004 += 0.001
45 0.000 += 0.001 0.004 += 0.001
50 0.000 += 0.001 0.005 += 0.002
```

Sorry I screwed up the first commit message, and then I tried to go back and change it somehow, but this only added more commit messages and caused some merge to happen.