title: numpy.einsum error: too many subscripts for operand
body: <p>I am trying to use <code>einsum</code> to perform tensor multiplication. I am working in MATLAB, but am using the python interface to call <code>numpy.einsum</code> as described in <a href="https://stackoverflow.com/questions/55913093/">this Q&amp;A</a>. Below is the code I'm using to perform the multiplication: </p>
  
  <pre class="lang-matlab prettyprint-override"><code>np = py.importlib.import_module('numpy');
  ndim = 3; i = eye(ndim);
  I = np.einsum('il,jk',matpy.mat2nparray(i),matpy.mat2nparray(i));
  I4 = matpy.nparray2mat(...
    np.einsum('ijxyz,klxyz -&gt; ijklxyz', I, matpy.mat2nparray(ones([30,30,30])) ));
  </code></pre>
  
  <p>However, the above code fails with the following error:</p>
  
  <pre><code>ValueError: einstein sum subscripts string contains too many subscripts for operand 0
  </code></pre>