JuliaArrays / StaticArrays.jl

Statically sized arrays for Julia
Other
762 stars 148 forks source link

Support @MMatrix I(3) for identity matrix #1232

Open 3f6a opened 8 months ago

3f6a commented 8 months ago

Currently:

julia> @MMatrix I(3)
ERROR: LoadError: @MMatrix only supports the zeros(), ones(), fill(), rand(), randn(), and randexp() functions.

It would be nice to support @MMatrix I(n) for quick and efficient construction of statically sized identity matrix (and similarly for @SMatrix)