Linear Algebra tricks?

There is an I(n) constructor, eg

julia> I(3)
3×3 Diagonal{Bool,Array{Bool,1}}:
 1  ⋅  ⋅
 ⋅  1  ⋅
 ⋅  ⋅  1

And then there is

You are looking for FillArrays.Eye.

5 Likes