menpo/menpofit — pull request #12 by trigeorgis (2014-12-06 15:54:38+00:00)
Title: Speedup: Use tensordot instead of einsum

Einsum uses naive summing and isn't up to par with blas dot routine.
We obtain 87% speedup for the alterative forward additive.

With einstein summation
```
%%timeit
fitter_add.fit(test_img, initial_s, gt_shape=gt_s)
1 loops, best of 3: 3.95 s per loop
```
With tensordot
```
%%timeit
fitter_with_optimization.fit(test_img, initial_s, gt_shape=gt_s)
1 loops, best of 3: 2.11 s per loop
```