Unitful.jl: type matching dimensions

This is not specific to Unitful: Types · The Julia Language

This last point is very important: even though Float64 <: Real we DO NOT have Point{Float64} <: Point{Real}.

!(energies isa Array{  EnergyQuantity, 2})
# but
  energies isa Array{<:EnergyQuantity, 2}
2 Likes