Since matrices on a computer are actually 2-D matrices stored as linear 'arrays' (ok, memory locations)... I'm not sure what this is. Pretty standard implementation of the concept.
Curious why this isn’t in PyTorch.
MATLAB does this