sup3r.preprocessing.samplers.utilities.daily_time_sampler

sup3r.preprocessing.samplers.utilities.daily_time_sampler#

daily_time_sampler(data, shape, time_index)[source]#

Finds a random temporal slice from data starting at midnight

Parameters:
  • data (Union[np.ndarray, da.core.Array]) – Data array with dimensions (spatial_1, spatial_2, temporal, features)

  • shape (int) – (time_steps) Size of time slice to sample from data, must be an integer less than or equal to 24.

  • time_index (pd.DatetimeIndex) – Time index that matches the data axis=2

Returns:

slice (slice) – time slice with size shape of data starting at the beginning of the day