Skip to content

Commit

Permalink
r.learn.train: np.object to object (#878)
Browse files Browse the repository at this point in the history
Following up on bug report #872 - with numpy > 1.24.0 the numpy object is depricated. Changing `np.object` to `object` should solve the problem.
  • Loading branch information
ecodiv committed Mar 20, 2023
1 parent 5e55ded commit fae785d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/raster/r.learn.ml2/r.learn.train/r.learn.train.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def main():
X, y, cat = stack.extract_points(training_points, field)
y = y.flatten()

if y.dtype in (np.object_, np.object):
if y.dtype in (np.object_, object):
from sklearn.preprocessing import LabelEncoder

le = LabelEncoder()
Expand Down

0 comments on commit fae785d

Please sign in to comment.