Skip to content

Commit

Permalink
fix bug in io_pymc3 and add warning for PyMC3<3.9 (#1203)
Browse files Browse the repository at this point in the history
* fix bug in io_pymc3 and add warning for PyMC3<3.9

* update changelog
  • Loading branch information
OriolAbril authored May 23, 2020
1 parent 8676e40 commit f1db2c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### New features

### Maintenance and fixes
* fix bug in `from_pymc3` when used with PyMC3<3.9 (#1203)

### Deprecation

Expand Down
8 changes: 7 additions & 1 deletion arviz/data/io_pymc3.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@ def __init__(
"tuning_steps": trace.report.n_tune,
}
else:
self.nchains = len(trace)
self.ndraws = len(trace)
if self.save_warmup:
warnings.warn(
"Warmup samples will be stored in posterior group and will not be"
" excluded from stats and diagnostics. Please consider using PyMC3>=3.9",
UserWarning,
)
else:
self.nchains = self.ndraws = 0

Expand Down

0 comments on commit f1db2c4

Please sign in to comment.