Re: [Numpy-discussion] Programmatically contracting multiple tensors

2021-03-24 Thread Michael Lamparski
Hi, I must thank y'all for the exceptionally fast responses (and apologize for my own tragically slow response!) On Sat, Mar 13, 2021 at 1:32 AM Eric Wieser wrote: > Einsum has a secret integer argument format that appears in the Examples section of the > `np.einsum` docs, but appears not to be

Re: [Numpy-discussion] Programmatically contracting multiple tensors

2021-03-12 Thread Andras Deak
On Sat, Mar 13, 2021 at 1:32 AM Eric Wieser wrote: > > Einsum has a secret integer argument format that appears in the Examples > section of the `np.einsum` docs, but appears not to be mentioned at all in > the parameter listing. It's mentioned (albeit somewhat cryptically) sooner in the

Re: [Numpy-discussion] Programmatically contracting multiple tensors

2021-03-12 Thread Eric Wieser
Einsum has a secret integer argument format that appears in the Examples section of the `np.einsum` docs, but appears not to be mentioned at all in the parameter listing. Eric On Sat, 13 Mar 2021 at 00:25, Michael Lamparski wrote: > Greetings, > > I have something in my code where I can

[Numpy-discussion] Programmatically contracting multiple tensors

2021-03-12 Thread Michael Lamparski
Greetings, I have something in my code where I can receive an array M of unknown dimensionality and a list of "labels" for each axis. E.g. perhaps I might get an array of shape (2, 47, 3, 47, 3) with labels ['spin', 'atom', 'coord', 'atom', 'coord']. For every axis that is labeled "coord", I