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

Allow mismatched element types for weighted means #476

Merged
merged 1 commit into from
Mar 5, 2019

Conversation

ararslan
Copy link
Member

@ararslan ararslan commented Mar 4, 2019

We've recently inadvertently disallowed a mismatch between the array's element type and the element type of the weights when computing a weighted mean. This leads to bizarre behavior, as it dispatches to a nonsensical method where the array is treated as a function.

Fixes #475

We've recently inadvertently disallowed a mismatch between the array's
element type and the element type of the weights when computing a
weighted mean. This leads to bizarre behavior, as it dispatches to a
nonsensical method where the array is treated as a function.
@codecov
Copy link

codecov bot commented Mar 4, 2019

Codecov Report

Merging #476 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #476   +/-   ##
=======================================
  Coverage   85.11%   85.11%           
=======================================
  Files          21       21           
  Lines        2083     2083           
=======================================
  Hits         1773     1773           
  Misses        310      310
Impacted Files Coverage Δ
src/weights.jl 78.26% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c9ca27...b570162. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Mar 4, 2019

Codecov Report

Merging #476 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #476   +/-   ##
=======================================
  Coverage   85.11%   85.11%           
=======================================
  Files          21       21           
  Lines        2083     2083           
=======================================
  Hits         1773     1773           
  Misses        310      310
Impacted Files Coverage Δ
src/weights.jl 78.26% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c9ca27...b570162. Read the comment docs.

@nalimilan
Copy link
Member

Good catch. But AFAICT the problem isn't the type mismatch, it's just that #442 added the T<:Number requirement (which previously applied only when dims was provided, which didn't really make sense).

@ararslan
Copy link
Member Author

ararslan commented Mar 5, 2019

But AFAICT the problem isn't the type mismatch ...

Oh yeah true. We can just change the commit message on merge to make it more accurate.

@ararslan ararslan merged commit 1823086 into master Mar 5, 2019
@ararslan ararslan deleted the aa/mismatched-eltype branch March 5, 2019 18:29
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