You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently tried getting a SIQuantity range using linspace, but it's not supported:
julia> using SIUnits
julia> using SIUnits.ShortUnits
julia> linspace(0s, 10s, 100)
ERROR: MethodError: `linspace` has no method matching linspace(::SIUnits.SIQuantity{Int64,0,0,1,0,0,0,0,0,0}, ::SIUnits.SIQuantity{Int64,0,0,1,0,0,0,0,0,0}, ::Int64)
Closest candidates are:
linspace{T<:AbstractFloat}(::T<:AbstractFloat, ::T<:AbstractFloat, ::Real)
linspace(::Real, ::Real, ::Real)
linspace{T<:ColorTypes.Color{T,N}}(::T<:ColorTypes.Color{T,N}, ::T<:ColorTypes.Color{T,N}, ::Any)
I started looking into an implementation but it looks like you already went through this with Range, and decided to re-implement all the Range stuff with SIRange, so I figured I'd get some early feedback. Do you think that's the best way forward with LinSpace as well? I assume there must be use cases for non-Real SIUnit values or else you would have just made SIQuantity{T<:Real, ...} <: Real instead of the more general Number, right?
I have a feeling that this is an application where the Trait / abstract interface stuff will provide a cleaner solution, so another option might just be to wait until that settles down.
The text was updated successfully, but these errors were encountered:
I recently tried getting a SIQuantity range using
linspace
, but it's not supported:I started looking into an implementation but it looks like you already went through this with
Range
, and decided to re-implement all theRange
stuff withSIRange
, so I figured I'd get some early feedback. Do you think that's the best way forward withLinSpace
as well? I assume there must be use cases for non-Real
SIUnit values or else you would have just madeSIQuantity{T<:Real, ...} <: Real
instead of the more generalNumber
, right?I have a feeling that this is an application where the Trait / abstract interface stuff will provide a cleaner solution, so another option might just be to wait until that settles down.
The text was updated successfully, but these errors were encountered: