LinearAlgebra.jl
LinearAlgebra.jl copied to clipboard
Support broadcasting `I`
It would be nice to create this matrix:
1 0 0 -1 0 0
0 1 0 0 -1 0
0 0 1 0 0 -1
with a single allocation by broadcasting I
x = Matrix{Int}(undef, 3, 6)
x[1:3, 1:3] .= I
x[1:3, 4:6] .= -I