Skip to content

Commit

Permalink
fix: correct np.int to int for numpy compatibility (#123)
Browse files Browse the repository at this point in the history
Co-authored-by: David Pratella <[email protected]>
  • Loading branch information
dprat and David Pratella authored Mar 30, 2023
1 parent bcd6257 commit 96e762b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepforest/forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def _partition_estimators(n_estimators, n_jobs):

# Partition estimators between jobs
n_estimators_per_job = np.full(
n_jobs, n_estimators // n_jobs, dtype=np.int
n_jobs, n_estimators // n_jobs, dtype=int
)
n_estimators_per_job[: n_estimators % n_jobs] += 1
starts = np.cumsum(n_estimators_per_job)
Expand Down Expand Up @@ -563,7 +563,7 @@ def _validate_y_class_weight(self, y):
self.classes_ = []
self.n_classes_ = []

y_store_unique_indices = np.zeros(y.shape, dtype=np.int)
y_store_unique_indices = np.zeros(y.shape, dtype=int)
for k in range(self.n_outputs_):
classes_k, y_store_unique_indices[:, k] = np.unique(
y[:, k], return_inverse=True
Expand Down

0 comments on commit 96e762b

Please sign in to comment.