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

squeeze dim_0 dimensions for scalars away #6764

Merged
merged 2 commits into from
Jun 16, 2023

Conversation

TimOliverMaier
Copy link
Contributor

@TimOliverMaier TimOliverMaier commented Jun 9, 2023

  1. Squeeze scalars in xarray.Dataset generated for constant_data by arviz. This is a provisional fix until the behavior of arviz here is refactored.

What is this PR about?
This PR is supposed to fix #6755 , by squeezing the _dim_0 dimension in the constant_data dataset for all scalars.
Checklist

Bugfixes


📚 Documentation preview 📚: https://pymc--6764.org.readthedocs.build/en/6764/

1. Squeeze scalars in `xarray.Dataset` generated
   for `constant_data` by arviz.
   This is a provisional fix until the behavior
   of arviz here is refactored.
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Merging #6764 (654e9f9) into main (261862d) will decrease coverage by 0.02%.
The diff coverage is 90.24%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6764      +/-   ##
==========================================
- Coverage   91.93%   91.92%   -0.02%     
==========================================
  Files          95       95              
  Lines       16125    16139      +14     
==========================================
+ Hits        14825    14835      +10     
- Misses       1300     1304       +4     
Impacted Files Coverage Δ
pymc/logprob/basic.py 96.85% <55.55%> (-3.15%) ⬇️
pymc/backends/arviz.py 96.48% <100.00%> (+0.09%) ⬆️
pymc/logprob/__init__.py 100.00% <100.00%> (ø)
pymc/logprob/scan.py 98.49% <100.00%> (ø)
pymc/model.py 89.91% <100.00%> (ø)
pymc/sampling/mcmc.py 89.88% <100.00%> (+0.06%) ⬆️
pymc/step_methods/compound.py 97.63% <100.00%> (ø)
pymc/testing.py 91.60% <100.00%> (ø)

@ricardoV94 ricardoV94 merged commit 9bb3cf0 into pymc-devs:main Jun 16, 2023
21 checks passed
@ricardoV94
Copy link
Member

Thanks @TimOliverMaier

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.

Scalar constant data is promoted to rank 1 in returned InferenceData
3 participants