Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/openeo_processes/cubes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,10 @@ class PredictRandomForest:

@staticmethod
def exec_xar(data, dimension, model = None, context = None, client = None, input_filepath = None):
unstack = False
if 'x' in data.dims and 'y' in data.dims:
data = flatten_dimensions(data=data, dimensions=["y", "x"], target_dimension="result")
unstack = True
if isinstance(model, str):
model = load_ml_model(model, input_filepath = input_filepath)
if context is not None:
Expand All @@ -2074,7 +2078,6 @@ def exec_xar(data, dimension, model = None, context = None, client = None, input
predictor_cols = list(data.dims)
if dimension in predictor_cols:
predictor_cols.remove(dimension)
unstack = False
if len(predictor_cols) == 1:
stacked = data
I = stacked[predictor_cols[0]].values
Expand Down