Skip to content

fix calls to constructor #70

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

Merged
merged 2 commits into from
Jun 9, 2023
Merged

Conversation

SimonDanisch
Copy link
Contributor

KDTree and LoessModel only accept concrete matrices, while loess and KDTree accept abstract matrices.
This PR makes sure to convert before calling the inner KDTree / LoessModel constructor. Fixes: https://github.com/MakieOrg/AlgebraOfGraphics.jl/pull/462 I'm not 100% sure why the converts are needed, since Julia usually does call convert(FieldType, field)` and it seems to work fine for certain abstractmatrices, but fails for e.g.:

Loess.loess(reshape(view(rand(4), 1:4), (4, 1)), rand(4))

@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (9fd7d9d) 89.90% compared to head (f352518) 89.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #70   +/-   ##
=======================================
  Coverage   89.90%   89.90%           
=======================================
  Files           2        2           
  Lines         208      208           
=======================================
  Hits          187      187           
  Misses         21       21           
Impacted Files Coverage Δ
src/Loess.jl 83.80% <100.00%> (ø)
src/kd.jl 96.11% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@andreasnoack andreasnoack merged commit c4b4e4f into JuliaStats:master Jun 9, 2023
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 this pull request may close these issues.

3 participants