sup3r.preprocessing.samplers.utilities.uniform_box_sampler

sup3r.preprocessing.samplers.utilities.uniform_box_sampler#

uniform_box_sampler(data_shape, sample_shape)[source]#

Returns a 2D spatial slice used to extract a sample from a data array.

Parameters:
  • data_shape (tuple) – (rows, cols) Size of full grid available for sampling

  • sample_shape (tuple) – (rows, cols) Size of grid to sample from data

Returns:

slices (list) – List of slices corresponding to row and col extent of arr sample