<div class="gmail_quote">On 25 October 2012 22:54, David Warde-Farley <span dir="ltr"><<a href="mailto:wardefar@iro.umontreal.ca" target="_blank">wardefar@iro.umontreal.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Oct 24, 2012 at 7:18 AM, George Nurser <<a href="mailto:gnurser@gmail.com">gnurser@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I was just looking at the einsum function.<br>
> To me, it's a really elegant and clear way of doing array operations, which<br>
> is the core of what numpy is about.<br>
> It removes the need to remember a range of functions, some of which I find<br>
> tricky (e.g. tile).<br>
><br>
> Unfortunately the present implementation seems ~ 4-6x slower than dot or<br>
> tensordot for decent size arrays.<br>
> I suspect it is because the implementation does not use blas/lapack calls.<br>
><br>
> cheers, George Nurser.<br>
<br>
</div>Hi George,<br>
<br>
IIRC (and I haven't dug into it heavily; not a physicist so I don't<br>
encounter this notation often), einsum implements a superset of what<br>
dot or tensordot (and the corresponding BLAS calls) can do. So, I<br>
think that logic is needed to carve out the special cases in which an<br>
einsum can be performed quickly with BLAS.<br></blockquote><div><br></div><div>Hi David,<br></div><div>Yes, that's my reading of the situation as well. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Pull requests in this vein would certainly be welcome, but requires<br>
the attention of someone who really understands how einsum works/can<br>
work.<br></blockquote><div><br></div><div>...and I guess how to interface w BLAS/LAPACK.</div><div><br></div><div>cheers, George. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
David<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div><br>