diag updated to distinguish between unitless and dimensionless
may be worthwhile to use permil = Unitful.FixedUnits(u"permille") so that K*permil doesn't get promoted/reduced to K
julia> using Unitful, UnitfulLinearAlgebra, LinearAlgebra
julia> permil = Unitful.FixedUnits(u"permille")
‰
julia> K = u"K"
K
julia> mat = UnitfulMatrix(ones(2,2)*permil*K)
2×2 UnitfulMatrix{Float64,2}
1.0 K ‰ 1.0 K ‰
1.0 K ‰ 1.0 K ‰
julia> diag(mat)
2-element Vector{Quantity}:
1.0 K ‰
1.0 K ‰
diag
updated to distinguish between unitless and dimensionlessmay be worthwhile to use
permil = Unitful.FixedUnits(u"permille")
so that K*permil doesn't get promoted/reduced to K