mad-lab-fau / gaitmap

The Gait and Movement Analysis Package
https://gaitmap.readthedocs.io
Other
38 stars 2 forks source link

Fix empty array handling when merging intervals #61

Closed livhe closed 4 months ago

livhe commented 4 months ago

Calling merge_intervals(np.ndarray(shape=(0, 2))) returned a numpy array with shape (1, 2) filled with random numbers.

These changes fix that by just returning the original array in case it is empty.

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.53%. Comparing base (ce60e9b) to head (a1a3fd7).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #61 +/- ## ======================================= Coverage 91.52% 91.53% ======================================= Files 61 61 Lines 3281 3283 +2 ======================================= + Hits 3003 3005 +2 Misses 278 278 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.