Skip to content

Commit 45f8e2e

Browse files
committed
DOC: Update for release 6.0
1 parent 0382db7 commit 45f8e2e

File tree

10 files changed

+34
-15
lines changed

10 files changed

+34
-15
lines changed

ci/install-posix.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ eval "$CMD"
1717

1818
if [ "${PIP_PRE}" = true ]; then
1919
python -m pip uninstall -y numpy pandas scipy matplotlib statsmodels xarray
20-
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy pandas scipy matplotlib xarray --upgrade --use-deprecated=legacy-resolver
21-
python -m pip install git+https://github.com/statsmodels/statsmodels.git --upgrade --no-build-isolation -v
20+
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy pandas scipy matplotlib xarray statsmodels --upgrade --use-deprecated=legacy-resolver
2221
fi

doc/source/changes/6.0.rst

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Version 6.0
2+
------------
3+
4+
* Increased minimums:
5+
6+
- Python: 3.9
7+
- formulaic: 1.0.0
8+
- NumPy: 1.22.3
9+
- SciPy: 1.8.0
10+
- pandas: 1.4.0
11+
- statsmodels: 0.13.0
12+
13+
* The key feature of this release is compatibility with NumPy 2. linearmodels
14+
wheels are built using NumPy 2.0.0rc1 (or later) and can run on any version
15+
of NumPy 1.22.3 or later, including NumPy 2.0.0.
16+
* Improved compatibility with fuure changes in pandas 3.0.0.
17+
18+
.. note::
19+
20+
In order to use NumPy 2, the environment must consist of packages
21+
that have been built against NumPy 2.0.0rc1 or later.

linearmodels/iv/results.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def _out_of_sample(
516516
)
517517
pred = self.model.predict(self.params, exog=exog, endog=endog, data=data)
518518
if not missing:
519-
pred = pred.loc[pred.notnull().all(1)]
519+
pred = pred.loc[pred.notnull().all(axis=1)]
520520
return pred
521521

522522
def predict(

linearmodels/panel/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3055,7 +3055,7 @@ def single(z: DataFrame) -> Series:
30553055
else:
30563056
avg_adj_r2 = np.nan
30573057
all_params = all_params.iloc[:, 1:-2]
3058-
params = np.asarray(all_params.mean(0).values[:, None], dtype=float)
3058+
params = np.asarray(all_params.mean(axis=0).values[:, None], dtype=float)
30593059

30603060
wy = np.asarray(wy_df)
30613061
wx = np.asarray(wx_df)

linearmodels/panel/results.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def _out_of_sample(
488488
)
489489
pred = self.model.predict(self.params, exog=exog, data=data, context=context)
490490
if not missing:
491-
pred = pred.loc[pred.notnull().all(1)]
491+
pred = pred.loc[pred.notnull().all(axis=1)]
492492
return pred
493493

494494
def predict(

linearmodels/tests/panel/test_data.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,13 @@ def test_dummies(mi_df):
400400
data = PanelData(mi_df)
401401
edummy = data.dummies()
402402
assert edummy.shape == (77, 11)
403-
assert np.all(edummy.sum(0) == 7)
403+
assert np.all(edummy.sum(axis=0) == 7)
404404
tdummy = data.dummies(group="time")
405405
assert tdummy.shape == (77, 7)
406-
assert np.all(tdummy.sum(0) == 11)
406+
assert np.all(tdummy.sum(axis=0) == 11)
407407
tdummy_drop = data.dummies(group="time", drop_first=True)
408408
assert tdummy_drop.shape == (77, 6)
409-
assert np.all(tdummy.sum(0) == 11)
409+
assert np.all(tdummy.sum(axis=0) == 11)
410410
with pytest.raises(ValueError):
411411
data.dummies("unknown")
412412

linearmodels/tests/panel/test_formula.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,4 +352,4 @@ def test_escaped_variable_name():
352352
)
353353
mod = PanelOLS.from_formula("`var a` ~ 1", data=data)
354354
res = mod.fit()
355-
assert_allclose(res.params, data.mean(0))
355+
assert_allclose(res.params, data.mean(axis=0))

requirements-dev.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
xarray>=0.16
22
mypy>=1.3
3-
black[jupyter]==23.11.0
4-
pytest>=7.3.0
3+
black[jupyter]==24.4.0
4+
pytest>=7.3.0,<8
55
isort>=5.12
66
ipython
77
matplotlib

requirements-test.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
black[jupyter]==23.11.0
1+
black[jupyter]==24.4.0
22
coverage
33
flake8
44
isort
55
colorama
66
matplotlib
7-
pytest>=7.3.0
7+
pytest>=7.3.0,<8
88
pytest-xdist
99
pytest-cov
1010
seaborn

requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
numpy>=1.22.3,<3
22
pandas>=1.4.0
33
scipy>=1.8.0
4-
statsmodels>=0.12.0
4+
statsmodels>=0.13.0
55
mypy_extensions>=0.4
66
Cython>=3.0.10
77
pyhdfe>=0.1
88
formulaic>=1.0.0
99
# versioning
1010
setuptools_scm[toml]>=8.0.0,<9.0.0
11-

0 commit comments

Comments
 (0)