pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.53k stars 1.98k forks source link

Fix error in `dataset_to_point_list` when chain, draw are not the leading dims #7180

Closed OriolAbril closed 4 months ago

OriolAbril commented 5 months ago

Description

Split the dict comprehension in two to keep transposing and reshaping coherent. Otherwise, the sizes used in the reshaping are taken from the object before transposing and the function doesn't work whenever the transposing is actually needed.

Related Issue

Checklist

Type of change


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

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.24%. Comparing base (6c6fd13) to head (d3e0908). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pymc-devs/pymc/pull/7180/graphs/tree.svg?width=650&height=150&src=pr&token=JFuXtOJ4Cb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)](https://app.codecov.io/gh/pymc-devs/pymc/pull/7180?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) ```diff @@ Coverage Diff @@ ## main #7180 +/- ## ======================================= Coverage 92.24% 92.24% ======================================= Files 100 100 Lines 16887 16888 +1 ======================================= + Hits 15577 15578 +1 Misses 1310 1310 ``` | [Files](https://app.codecov.io/gh/pymc-devs/pymc/pull/7180?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) | Coverage Δ | | |---|---|---| | [pymc/util.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7180?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy91dGlsLnB5) | `80.93% <100.00%> (+0.08%)` | :arrow_up: |
ricardoV94 commented 5 months ago

mypy is unhappy

OriolAbril commented 4 months ago

I could only find 9ne failed test which seems unrelated (checking from my phone)

ricardoV94 commented 4 months ago

I could only find 9ne failed test which seems unrelated (checking from my phone)

Rerunning