Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ jobs:
uvx hatch run ${{ matrix.env.name }}:cov-report # report visibly
uvx hatch run ${{ matrix.env.name }}:coverage xml # create report for upload
- name: Upload coverage
uses: codecov/codecov-action@v6
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
use_oidc: true

check:
name: Tests pass in all hatch environments
Expand Down
5 changes: 4 additions & 1 deletion pertpy/tools/_coda/_base_coda.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,11 @@ def summary_prepare(
)
summ = summ.convert_dtypes(dtype_backend="numpy_nullable").infer_objects()

# az.summary orders rows by var_names then C-order of each variable's dims, matching values.flatten(), so align the medians positionally.
posterior = arviz_data["posterior"].to_dataset()
summ["median"] = posterior[var_names].median(dim=["chain", "draw"]).to_dataframe().stack().reindex(summ.index)
summ["median"] = np.concatenate(
[posterior[var].median(dim=["chain", "draw"]).values.flatten() for var in var_names]
)

effect_df = summ.loc[summ.index.str.match("|".join([r"beta\["]))].copy()
intercept_df = summ.loc[summ.index.str.match("|".join([r"alpha\["]))].copy()
Expand Down
Loading