Commit d169164
[sargent_surico] Update arviz calls for the 1.x API
The lecture installs arviz unpinned, and `pip install arviz` now resolves
1.2.0 -- the rewrite that dispatches to arviz-base/arviz-stats/arviz-plots.
Two calls still used the 0.x API.
`az.from_dict` took the posterior group as its first positional argument in
0.x, so a flat {var_name: array} mapping worked. In 1.x the first argument is
{group_name: {var_name: array}}, so each entry of FREE was read as a group and
dict_to_dataset() was handed a raw ndarray, failing the HTML build with
`AttributeError: 'numpy.ndarray' object has no attribute 'items'`.
`az.summary` no longer emits hdi_3%/hdi_97%; it defaults to an 89% ETI. Ask
for ci_kind='hdi', ci_prob=0.94 to keep the interval the 0.x default gave, and
select the new hdi94_lb/hdi94_ub columns. Execution stopped at the from_dict
cell above, so this second break never reached the CI log.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent c43db95 commit d169164
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | | - | |
| 1287 | + | |
| 1288 | + | |
1288 | 1289 | | |
1289 | 1290 | | |
1290 | 1291 | | |
| |||
1637 | 1638 | | |
1638 | 1639 | | |
1639 | 1640 | | |
1640 | | - | |
| 1641 | + | |
| 1642 | + | |
1641 | 1643 | | |
1642 | | - | |
| 1644 | + | |
1643 | 1645 | | |
1644 | 1646 | | |
1645 | 1647 | | |
| |||
0 commit comments