Skip to content

Commit 9e6f33f

Browse files
authored
COMPAT: pandas 3 compatibility (#73)
* COMPAT: pandas 3 compatibility * fix * pull mgwr from git
1 parent e11ad33 commit 9e6f33f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ci/py313_dev.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ dependencies:
88
- pip
99
# testing
1010
- geodatasets
11-
- mgwr
1211
- pre-commit
1312
- pytest
1413
- pytest-cov
@@ -20,7 +19,9 @@ dependencies:
2019
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
2120
--extra-index-url https://pypi.org/simple
2221
- numpy
22+
- pandas
2323
- scipy
2424
- scikit-learn
2525
- git+https://github.com/geopandas/geopandas.git
2626
- git+https://github.com/pysal/libpysal.git
27+
- git+https://github.com/pysal/mgwr.git

gwlearn/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ def _predict_local_ensemble(
10881088
with open(local_model, "rb") as f:
10891089
local_model = load(f)
10901090

1091-
if local_model is not None:
1091+
if not pd.isna(local_model):
10921092
pred.append(
10931093
pd.Series(
10941094
local_model.predict_proba(x_).flatten(),
@@ -1120,7 +1120,7 @@ def _predict_local_nearest(self, x_: pd.DataFrame, model_id: Hashable) -> pd.Ser
11201120
with open(local_model, "rb") as f:
11211121
local_model = load(f)
11221122

1123-
if local_model is not None:
1123+
if not pd.isna(local_model):
11241124
return pd.Series(
11251125
local_model.predict_proba(x_).flatten(),
11261126
index=local_model.classes_,

0 commit comments

Comments
 (0)