Skip to content

fix calls to constructor#70

Merged
andreasnoack merged 2 commits intoJuliaStats:masterfrom
SimonDanisch:master
Jun 9, 2023
Merged

fix calls to constructor#70
andreasnoack merged 2 commits intoJuliaStats:masterfrom
SimonDanisch:master

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