Skip to content

Fix statsmodels FutureWarning for Yule-Walker estimation - #14139

Merged
larsoner merged 3 commits into
mne-tools:mainfrom
tsbinns:yule-walker-fix
Aug 6, 2026
Merged

Fix statsmodels FutureWarning for Yule-Walker estimation#14139
larsoner merged 3 commits into
mne-tools:mainfrom
tsbinns:yule-walker-fix

Conversation

@tsbinns

@tsbinns tsbinns commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

pip-pre test runs failing due to a statsmodels FutureWarning (see e.g., https://github.com/mne-tools/mne-python/actions/runs/31015622468/job/92338994830?pr=13971):

mne/time_frequency/tests/test_ar.py:26: in test_yule_walker
    sm_rho, sm_sigma = sm_yw(d, order=2)
                       ^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/statsmodels/regression/linear_model.py:1618: in yule_walker
    warnings.warn(
E   FutureWarning: yule_walker currently returns a plain tuple whose length depends on the inv argument. In release 0.16 or after July 2028, whichever is later, the default behavior will switch to always returning a YuleWalkerResult NamedTuple. Set use_namedtuple=True to switch now, or use_namedtuple=False to keep the current behavior and silence this warning.

These changes retain the current behaviour and silence the warning.

@tsbinns

tsbinns commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@tsbinns

tsbinns commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

No, still a warning for that which needs to be caught on pip-pre jobs

@larsoner

larsoner commented Aug 6, 2026

Copy link
Copy Markdown
Member

Thanks @tsbinns !

@larsoner
larsoner merged commit 4ee4fa7 into mne-tools:main Aug 6, 2026
29 checks passed
@tsbinns
tsbinns deleted the yule-walker-fix branch August 6, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants