BUG: Fix crash in error message formatting introduced by gh-11230
BUG: Fix crash in error message formatting introduced by gh-11230

Fixes gh-11221, and now produces:

```python
>>> a = np.ones((3, 3, 4, 5, 6))
>>> b = np.ones((3, 4, 5))
>>> np.einsum('aabcb,abc', a, b)
ValueError: dimensions in operand 0 for collapsing index 'b' don't match (4 != 6)
```

anntzer/numpy,MSeifert04/numpy,pizzathief/numpy,pdebuyl/numpy,numpy/numpy,madphysicist/numpy,jorisvandenbossche/numpy,seberg/numpy,WarrenWeckesser/numpy,ahaldane/numpy,abalkin/numpy,grlee77/numpy,anntzer/numpy,pbrod/numpy,numpy/numpy,madphysicist/numpy,jorisvandenbossche/numpy,endolith/numpy,pbrod/numpy,charris/numpy,jakirkham/numpy,pbrod/numpy,WarrenWeckesser/numpy,abalkin/numpy,charris/numpy,jorisvandenbossche/numpy,mhvk/numpy,grlee77/numpy,grlee77/numpy,pbrod/numpy,pizzathief/numpy,ahaldane/numpy,pdebuyl/numpy,jakirkham/numpy,rgommers/numpy,endolith/numpy,WarrenWeckesser/numpy,mattip/numpy,simongibbons/numpy,endolith/numpy,pizzathief/numpy,madphysicist/numpy,abalkin/numpy,simongibbons/numpy,jorisvandenbossche/numpy,seberg/numpy,mhvk/numpy,numpy/numpy,madphysicist/numpy,jakirkham/numpy,MSeifert04/numpy,jakirkham/numpy,rgommers/numpy,mhvk/numpy,ahaldane/numpy,shoyer/numpy,seberg/numpy,jakirkham/numpy,grlee77/numpy,WarrenWeckesser/numpy,shoyer/numpy,anntzer/numpy,anntzer/numpy,rgommers/numpy,WarrenWeckesser/numpy,numpy/numpy,mattip/numpy,simongibbons/numpy,simongibbons/numpy,pdebuyl/numpy,mattip/numpy,pizzathief/numpy,charris/numpy,MSeifert04/numpy,pbrod/numpy,pizzathief/numpy,seberg/numpy,shoyer/numpy,MSeifert04/numpy,shoyer/numpy,pdebuyl/numpy,madphysicist/numpy,jorisvandenbossche/numpy,simongibbons/numpy,grlee77/numpy,endolith/numpy,ahaldane/numpy,ahaldane/numpy,MSeifert04/numpy,shoyer/numpy,charris/numpy,mhvk/numpy,mattip/numpy,mhvk/numpy,rgommers/numpy