Internally converts non-square to square matrices for shearsorting