neuralib.util.segments

segment_bool_mask

is_sorted

Check if array is sorted.

segment_mask

segmenting an array that the value is long enough.

segment_epochs

has_gap

segment_gap

segmenting an array that cut at the place which the difference of nearby value larger than gap.

as_segment

segment_range

change [(start, stop)] to [(start, duration)]

segment_duration

segment_at_least_duration

segment_expand_duration

segment_universe

segment_flatten

sorting and remove overlapped segments.

segment_invert

segment_intersection

segment_union

segment_diff

segment_contains

whether t in the segments.

segment_index

find the index of segs where t located

segment_overlap

segment_overlap_index

segment_join

segment_join_index

segment_map

segment_group_map

segment_sample

segment_bins

Divide segs into equal-size sub-segments with equal duration and equal interval.

shuffle_time

Shuffle t by remapping function method for t in segs.

shuffle_time_uniform

Shuffle t for t in segs.

shuffle_time_normal

Shuffle t with add a value from a normal distribution for t in segs.

shift_time

Shift t with a shift value for t in segs.

foreach_map

Map function f into vector v in given sections.

grouped_iter

Groups elements from the input iterable v into tuples of length n

Data

neuralib.util.segments.SegmentLike