Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ustrip() does not work with Base.TwicePrecision #709

Closed
staticfloat opened this issue Feb 28, 2024 · 0 comments · Fixed by #711
Closed

ustrip() does not work with Base.TwicePrecision #709

staticfloat opened this issue Feb 28, 2024 · 0 comments · Fixed by #711

Comments

@staticfloat
Copy link
Contributor

MWE:

xs = 1:0.1:2
ustrip.(xs)

This errors out:

ERROR: MethodError: no method matching ustrip(::Base.TwicePrecision{Float64})
The function `ustrip` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  ustrip(::Missing)
   @ Unitful ~/.julia/packages/Unitful/R4J37/src/utils.jl:59
  ustrip(::Type, ::Unitful.Units, ::Any)
   @ Unitful ~/.julia/packages/Unitful/R4J37/src/utils.jl:38
  ustrip(::LinearAlgebra.SymTridiagonal)
   @ Unitful ~/.julia/packages/Unitful/R4J37/src/utils.jl:101
  ...

Stacktrace:
 [1] broadcasted(::Base.Broadcast.DefaultArrayStyle{1}, x::typeof(ustrip), r::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64})
   @ Unitful ~/.julia/packages/Unitful/R4J37/src/range.jl:159
 [2] broadcasted(::typeof(ustrip), ::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64})
   @ Base.Broadcast ./broadcast.jl:1320
 [3] top-level scope
   @ REPL[10]:2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant