MeasureBase.jl icon indicating copy to clipboard operation
MeasureBase.jl copied to clipboard

proxyfuns

Open cscherrer opened this issue 1 year ago • 2 comments

MeasureTheory.jl currently has functions like this:

StatsBase.entropy(m::AbstractMeasure, b::Real) = entropy(proxy(m), b)
Statistics.mean(m::AbstractMeasure) = mean(proxy(m))
Statistics.std(m::AbstractMeasure) = std(proxy(m))
Statistics.var(m::AbstractMeasure) = var(proxy(m))
Statistics.quantile(m::AbstractMeasure, q) = quantile(proxy(m), q)

But proxy is defined in MeasureBase, so this is type piracy. Better to move them here if possible.

cscherrer avatar Sep 27 '24 19:09 cscherrer

Codecov Report

:x: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 53.36%. Comparing base (3d1084f) to head (e88e952). :warning: Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
src/rand.jl 0.00% 9 Missing :warning:
src/utils.jl 0.00% 5 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
- Coverage   53.97%   53.36%   -0.62%     
==========================================
  Files          43       43              
  Lines        1219     1233      +14     
==========================================
  Hits          658      658              
- Misses        561      575      +14     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Sep 27 '24 20:09 codecov[bot]

I'd like to pull this into the other major changes I'm working on - the resulting version of MeasureBase will require Julia v1.10 (designated as the next LTS), so we can so this via an extension then.

oschulz avatar Sep 28 '24 12:09 oschulz