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

Draft: Add rekey method #15

Closed
wants to merge 1 commit into from
Closed

Draft: Add rekey method #15

wants to merge 1 commit into from

Conversation

glennmoy
Copy link
Member

Probably should be overloading the methods introduced in mcabbott/AxisKeys.jl#63

I'll note a potentially concerning edge-case here, which existed prior to this but is maybe exposed more blatantly by it.
If the parent distribution is constructed with a KeyedArray but the KeyedDistribution is given a new set of keys there is no expectation that these should match, e.g.

ka = KeyedArray(ones(3); id=[:a, :b, :c])

kd = KeyedDistribution(MvNormal(ka), [:x, :y, :z])

@codecov
Copy link

codecov bot commented May 13, 2021

Codecov Report

Merging #15 (0924fb5) into main (15926a2) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
+ Coverage   98.00%   98.03%   +0.03%     
==========================================
  Files           1        1              
  Lines          50       51       +1     
==========================================
+ Hits           49       50       +1     
  Misses          1        1              
Impacted Files Coverage Δ
src/KeyedDistributions.jl 98.03% <100.00%> (+0.03%) ⬆️

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 15926a2...0924fb5. Read the comment docs.

@glennmoy glennmoy changed the title Add rekey method Draft: Add rekey method May 14, 2021
Copy link
Contributor

@bencottier bencottier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@bencottier
Copy link
Contributor

bencottier commented May 14, 2021

I'll note a potentially concerning edge-case here

Good catch, I'm writing an issue. It's undocumented so not a bug, but would be useful to check this condition.

#17

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.

2 participants