Skip to content

Commit

Permalink
return original array if array is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
livhe committed Apr 15, 2024
1 parent ce60e9b commit a298092
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gaitmap/utils/array_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ def merge_intervals(input_array: np.ndarray, gap_size: int = 0) -> np.ndarray:
[18, 20]])
"""
if input_array.shape[0] == 0:
return input_array

return np.array(_solve_overlap(np.sort(input_array, axis=0, kind="stable"), gap_size))


Expand Down

0 comments on commit a298092

Please sign in to comment.