-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Milestone
Description
On the most recent 1.5 beta release I get the following error.
julia> using Unitful
julia> using Unitful: s
julia> allunique((1.0:1.0:10.0)s)
ERROR: DimensionError: s and 0 are not dimensionally compatible.
Stacktrace:
[1] convert(::Type{Quantity{Float64,𝐓,Unitful.FreeUnits{(s,),𝐓,nothing}}}, ::Int64) at /Users/zchristensen/.julia/packages/Unitfu
l/KE9TK/src/conversion.jl:111
[2] Base.TwicePrecision{Quantity{Float64,𝐓,Unitful.FreeUnits{(s,),𝐓,nothing}}}(::Int64, ::Int64) at ./twiceprecision.jl:185
[3] zero(::Type{Base.TwicePrecision{Quantity{Float64,𝐓,Unitful.FreeUnits{(s,),𝐓,nothing}}}}) at ./twiceprecision.jl:260
[4] allunique(::StepRangeLen{Quantity{Float64,𝐓,Unitful.FreeUnits{(s,),𝐓,nothing}},Base.TwicePrecision{Quantity{Float64,𝐓,Unitful
.FreeUnits{(s,),𝐓,nothing}}},Base.TwicePrecision{Quantity{Float64,𝐓,Unitful.FreeUnits{(s,),𝐓,nothing}}}}) at ./set.jl:390
[5] top-level scope at REPL[3]:1
This does raise some things that could probably be addressed in Unitful.jl but I wonder if it would make more sense to just have allunique(::AbstractRange) = true.
Metadata
Metadata
Assignees
Labels
No labels