Expanding a matrix by duplicating its elements

As for efficiency, you probably don’t want to construct this matrix at all, consider expressing it as a Kronecker product with LazyArrays

2 Likes