gaitmap.utils.array_handling: Helper to perform various array modifications#

A set of util functions that help to manipulate arrays in any imaginable way.

Functions#

sliding_window_view(arr, window_length, overlap)

Create a sliding window view of an input array with given window length and overlap.

bool_array_to_start_end_array(bool_array)

Find regions in bool array and convert those to start-end indices.

find_local_minima_below_threshold(data, ...)

Find local minima below a max_cost.

find_local_minima_with_distance(data[, ...])

Find local minima using scipy's find_peaks function.

find_extrema_in_radius(data, indices, radius)

Return the index of the global extrema of data in the given radius around each index in indices.

split_array_at_nan(a)

Split an array into sections at nan values.

multi_array_interpolation(arrays, n_samples)

Interpolate multiple 2D-arrays to the same length along axis 0.

merge_intervals(input_array[, gap_size])

Merge intervals that are overlapping and that are a distance less or equal to gap_size from each other.