Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old_names argument #405

Merged
merged 8 commits into from
Feb 28, 2024
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
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ New Features
Breaking changes
^^^^^^^^^^^^^^^^

- The supported versions of some dependencies were changed (`#399 <https://github.com/MESMER-group/mesmer/pull/399>`_):
- The supported versions of some dependencies were changed (`#399 <https://github.com/MESMER-group/mesmer/pull/399>`_, `#405 <https://github.com/MESMER-group/mesmer/pull/405>`_):

============ ============= =========
Package Old New
============ ============= =========
regionmask >=0.8 >=0.9
statsmodels not specified >=0.13
============ ============= =========

Deprecations
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements/min-all-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- regionmask=0.9
- scikit-learn
- shapely=1.8 # required by regionmask < 0.10
- statsmodels
- statsmodels=0.13
- xarray=2023.04
# for testing
- pytest
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
- pooch
- regionmask>=0.9
- scikit-learn
- statsmodels
- statsmodels>=0.13
- xarray>=2023.04 # because pandas 2 is required
# for testing
- black!=23
Expand Down
4 changes: 2 additions & 2 deletions mesmer/stats/_auto_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _select_ar_order_np(data, maxlag, ic="bic"):

from statsmodels.tsa.ar_model import ar_select_order

ar_lags = ar_select_order(data, maxlag=maxlag, ic=ic, old_names=False).ar_lags
ar_lags = ar_select_order(data, maxlag=maxlag, ic=ic).ar_lags

# None is returned if no lag is selected
selected_ar_order = np.NaN if ar_lags is None else ar_lags[-1]
Expand Down Expand Up @@ -567,7 +567,7 @@ def _fit_auto_regression_np(data, lags):

from statsmodels.tsa.ar_model import AutoReg

AR_model = AutoReg(data, lags=lags, old_names=False)
AR_model = AutoReg(data, lags=lags)
AR_result = AR_model.fit()

intercept = AR_result.params[0]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ install_requires =
pooch
regionmask >=0.9
scikit-learn
statsmodels
statsmodels >=0.13
xarray >=2023.04 # because pandas 2 is required

[options.extras_require]
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_auto_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def test_fit_auto_regression_np(lags):
mesmer.stats._auto_regression._fit_auto_regression_np(data, lags=lags)

mocked_auto_regression.assert_called_once()
mocked_auto_regression.assert_called_with(data, lags=lags, old_names=False)
mocked_auto_regression.assert_called_with(data, lags=lags)

mocked_auto_regression_result.fit.assert_called_once()
mocked_auto_regression_result.fit.assert_called_with()