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

bug in kde_range #39

Closed
OmriTreidel opened this issue Sep 30, 2016 · 0 comments · Fixed by #52
Closed

bug in kde_range #39

OmriTreidel opened this issue Sep 30, 2016 · 0 comments · Fixed by #52

Comments

@OmriTreidel
Copy link

There seem to be a problem with kde_range in univariant.jl: The range that is returned sometimes has the wrong number of points.

Can be easily detected by inserting length(lo:step:hi) == npoints || @show "ERROR", length(lo:step:hi)
before returning.

I think it results from a problem is linspace.

Suggested fix:

return lo + (0:npoints-1)*step instead of lo:step:hi

tlnagy added a commit to tlnagy/KernelDensity.jl that referenced this issue Jun 3, 2018
KernelDensity.jl rolled its own range generator which suffers from
similar flaws as Base's linspace prior to being fixed in
JuliaLang/julia#18777. This closes JuliaStats#39.
tlnagy added a commit to tlnagy/KernelDensity.jl that referenced this issue Jun 10, 2018
KernelDensity.jl rolled its own range generator which suffers from
similar flaws as Base's linspace prior to being fixed in
JuliaLang/julia#18777. This closes JuliaStats#39.
ararslan pushed a commit that referenced this issue Jun 10, 2018
KernelDensity.jl rolled its own range generator which suffers from
similar flaws as Base's linspace prior to being fixed in
JuliaLang/julia#18777. This closes #39.
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