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

Add methods for float #208

Closed
hyrodium opened this issue Apr 30, 2022 · 0 comments · Fixed by #299
Closed

Add methods for float #208

hyrodium opened this issue Apr 30, 2022 · 0 comments · Fixed by #299
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@hyrodium
Copy link
Owner

julia> k = KnotVector{Int}([1,2,3])
KnotVector([1, 2, 3])

julia> typeof(k)
KnotVector{Int64}

julia> float(k)
ERROR: MethodError: no method matching AbstractFloat(::KnotVector{Int64})
Closest candidates are:
  (::Type{T})(::AbstractChar) where T<:Union{AbstractChar, Number} at ~/julia/julia-1.7.2/share/julia/base/char.jl:50
  (::Type{T})(::Base.TwicePrecision) where T<:Number at ~/julia/julia-1.7.2/share/julia/base/twiceprecision.jl:255
  (::Type{T})(::Complex) where T<:Real at ~/julia/julia-1.7.2/share/julia/base/complex.jl:44
  ...
Stacktrace:
 [1] float(x::KnotVector{Int64})
   @ Base ./float.jl:269
 [2] top-level scope
   @ REPL[6]:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant