Skip to content

Commit

Permalink
array_find in reverse order gives wrong indices
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Dec 14, 2023
1 parent 8d9e3fb commit 0ac1500
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openeo_processes_dask/process_implementations/arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def array_find(
else:
masked_idxs = np.atleast_1d(np.ma.masked_array(idxs, mask=mask))

if reverse:
masked_idxs = data.size - 1 - idxs

return masked_idxs


Expand Down

0 comments on commit 0ac1500

Please sign in to comment.