Skip to content

Commit

Permalink
fixed merge conflict in CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Aksei committed Apr 19, 2024
2 parents 80c17dd + 0c022a9 commit 40f72d2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ project.
Resampling of state sequence is now also possible if the `target_sample_rate` is not a multiple of the HMM `sample_rate`, e.g. `target_sample_rate=200`, `sample_rate=52.1` (https://github.com/mad-lab-fau/gaitmap/pull/62)
- Changed call signature of class `BaseHmmFeatureTransformer.inverse_transform_state_sequence` (requires original `data` as input, `target_sample_rate` is no longer required).

## [Unreleased]

### Fixed

- Fixed a bug that when using `merge_interval` with empty input of shape (0, 2), the output was not empty.
(https://github.com/mad-lab-fau/gaitmap/pull/61)


## [2.3.0] - 2023-08-03

### Changed
Expand Down
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
1 change: 1 addition & 0 deletions tests/test_utils/test_array_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ class TestMergeIntervals:
np.array([[-2, 5]]),
1,
),
(np.empty(shape=(0, 2)), np.empty(shape=(0, 2)), 0),
(
np.array([[]]),
np.array([[]]),
Expand Down

0 comments on commit 40f72d2

Please sign in to comment.