Skip to content

Commit 0be1625

Browse files
committed
Fix numpy 1.24 compatibility
Signed-off-by: Keith Battocchi <[email protected]>
1 parent e3b58ab commit 0be1625

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

econml/_ensemble/_ensemble.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def _partition_estimators(n_estimators, n_jobs):
158158

159159
# Partition estimators between jobs
160160
n_estimators_per_job = np.full(n_jobs, n_estimators // n_jobs,
161-
dtype=np.int)
162-
n_estimators_per_job[:n_estimators % n_jobs] += 1
161+
dtype=int)
162+
n_estimators_per_job[: n_estimators % n_jobs] += 1
163163
starts = np.cumsum(n_estimators_per_job)
164164

165165
return n_jobs, n_estimators_per_job.tolist(), [0] + starts.tolist()

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ tf =
5858
tensorflow > 1.10, < 2.3;python_version < '3.9'
5959
; Version capped due to tensorflow incompatibility
6060
protobuf < 4
61+
; Version capped due to tensorflow incompatibility
62+
numpy < 1.24
6163
plt =
6264
graphviz
6365
; Version capped due to shap incompatibility
@@ -70,6 +72,8 @@ all =
7072
tensorflow > 1.10, < 2.3
7173
; Version capped due to tensorflow incompatibility
7274
protobuf < 4
75+
; Version capped due to tensorflow incompatibility
76+
numpy < 1.24
7377
; Version capped due to shap incompatibility
7478
matplotlib < 3.6.0
7579
dowhy < 0.9

0 commit comments

Comments
 (0)