statsmodels/deprecated-var-seed
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| statsmodels | warning | safe, with xpd check --fix |
statsmodels 0.15+ |
Statsmodels 0.15 renamed seed to rng on the VAR result methods
simulate_var and irf_errband_mc. The old keyword emits a
FutureWarning and forwards its value to the same argument.
result.simulate_var(steps=10, seed=42)result.simulate_var(steps=10, rng=42)What the rule reports
Section titled “What the rule reports”The rule follows results from VAR(...).fit(...) and their local
assignments. It checks calls without argument unpacking or a separate
value for rng. Both methods returned identical arrays with the two
spellings for the same integer seed in 0.15.0.
How to fix it
Section titled “How to fix it”Use xpd check --fix to rename the keyword. This requires statsmodels 0.15
or later. If your application needs a particular random stream across future
statsmodels releases, pass an explicitly constructed random number generator
or RandomState as appropriate.
Statsmodels RNG migration · simulate_var · irf_errband_mc
Diagnostic message
Section titled “Diagnostic message”Statsmodels 0.15 deprecated seed on VAR results. Pass the same value as rng.See all rules in the statsmodels pack.