Here's the einsum version:
`es = np.einsum('Na,ab,Nb->N',X,A,X)`
But that's running ~45x slower than your version.
OT: anyone know why einsum is so bad for this one?
Mark Daoust
On Sat, May 28, 2016 at 11:53 PM, Scott Sievert <sievert.sc...@gmail.com>
wrote:
> I
... The difference between the axes that broad-cast and the axes
that can sum when you hit them with an @ ... or something like that.
Just a thought.
Einsum is fantastic by the way, totally worth learning and using.
Mark Daoust
___
NumPy-Discussion mailing