neuralib.util.segments.shuffle_time_uniform

neuralib.util.segments.shuffle_time_uniform(t, segs=None, *, duration=inf, circular=True)[source]

Shuffle t for t in segs.

Parameters:
  • t (ndarray) – (N,) T-value array

  • segs (ndarray | None) – (S, 2) segment, only shift time in the segments.

  • duration (float) – The maximal T value

  • circular (bool) – keep total event number. If epochs is given, keep total event number in epochs.

Returns:

(N’,) T-value array

Return type:

ndarray