Concatenate along a new or an existing axis: `einsum` extension
Needs to be fully integrated with shape inference. The core functionality would be around an extension of the einsum notation, this allows to align and permute axes arbitrarily (on top of doing outer and inner products of selected axes). This introduces ^ into the einsum syntax. For example, a|b->c;a|c->d=>a|c->b^d would alias axes a, c (same-named) and b^d, and concatenate along the b resp. d axis. Eventually it would also support producing block-diagonal tensors with multiple-uses of ^, e.g. a->b;c->d=>a^c->b^d would produce a matrix with the original matrices as submatrices, a->b in the upper-left corner, c->d in the lower-right corner, and zero-valued matrices a->d and c->b in the other corners correspondingly. The syntax ^ would naturally bind tighter than label separator, for example ba;dc=>b^da^c is the same as b,a;d,c=>b^d,a^c (and has the same layout as a->b;c->d=>a^c->b^d).
Bumping this to high priority.
Or maybe not, for the simplest "k+1 dimensional" cases there's a workaround using fixed indexing.