Skip to content

Only accepts Float64 #48

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

Closed
ayushpatnaikgit opened this issue Oct 4, 2021 · 1 comment · Fixed by #64
Closed

Only accepts Float64 #48

ayushpatnaikgit opened this issue Oct 4, 2021 · 1 comment · Fixed by #64

Comments

@ayushpatnaikgit
Copy link

It seems the package doesn't accept Float32 or Float16, even though the code is meant to accept AbstractFloats.

I convert the inputs of the example to Array{Float32, 1}.

using Loess
xs = 10 .* rand(100)
ys = sin.(xs) .+ 0.5 * rand(100)
xs = convert(Array{Float32,1}, xs)
ys = convert(Array{Float32,1}, ys)

When I call the loess function, it gives an error.

model = loess(xs, ys)
ERROR: MethodError: no method matching build_kdtree(::Array{Float32,2}, ::Array{Int64,1}, ::Array{Float32,2}, ::Int64, ::Float64, ::Set{Array{Float32,1}})

If I convert the inputs back to Array{Float64, 1}, it works.

miguelbiron added a commit to miguelbiron/Loess.jl that referenced this issue Dec 6, 2021
miguelbiron added a commit to miguelbiron/Loess.jl that referenced this issue Dec 6, 2021
This was referenced Dec 6, 2021
@ViralBShah
Copy link
Contributor

ayushpatnaikgit Maybe you can help review and revive #53 to help fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants