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

Fix DiscreteUniformRV dropping degenerate dimension #6151

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Sep 27, 2022

What is this PR about?

Bug found by @drbenvincent
Scipy does not respect degenerate dimensions (size=1) implied by the parameters

Checklist

Major / Breaking Changes

  • ...

Bugfixes / New features

  • Fix bug where DiscreteUniformRV would drop degenerate dimensions from draws

Docs / Maintenance

  • ...

@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Merging #6151 (588b72d) into main (75e9406) will increase coverage by 2.14%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6151      +/-   ##
==========================================
+ Coverage   87.14%   89.29%   +2.14%     
==========================================
  Files          91       91              
  Lines       20717    20720       +3     
==========================================
+ Hits        18054    18501     +447     
+ Misses       2663     2219     -444     
Impacted Files Coverage Δ
pymc/distributions/discrete.py 99.21% <100.00%> (ø)
pymc/tests/distributions/test_discrete.py 98.88% <100.00%> (+<0.01%) ⬆️
pymc/parallel_sampling.py 85.80% <0.00%> (-1.00%) ⬇️
pymc/backends/base.py 86.44% <0.00%> (+0.73%) ⬆️
pymc/step_methods/hmc/quadpotential.py 73.76% <0.00%> (+0.74%) ⬆️
pymc/printing.py 86.08% <0.00%> (+0.86%) ⬆️
pymc/step_methods/slicer.py 96.20% <0.00%> (+1.26%) ⬆️
pymc/backends/report.py 91.04% <0.00%> (+4.47%) ⬆️
pymc/step_methods/arraystep.py 94.32% <0.00%> (+7.80%) ⬆️
pymc/sampling.py 82.19% <0.00%> (+12.08%) ⬆️
... and 2 more

@lucianopaz lucianopaz mentioned this pull request Sep 27, 2022
5 tasks
@ricardoV94
Copy link
Member Author

ricardoV94 commented Sep 28, 2022

Failing test is fixed by #6160

@ricardoV94 ricardoV94 merged commit 310a4d9 into pymc-devs:main Sep 29, 2022
@ricardoV94 ricardoV94 deleted the fix_discreteuniform branch June 6, 2023 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants