rex.utilities.utilities.get_chunk_ranges

get_chunk_ranges(ds_dim, chunk_size)[source]

Create list of chunk slices [(s_i, e_i), …]

Parameters:
  • ds_len (int) – Length of dataset axis to chunk

  • chunk_size (int) – Size of chunks

Returns:

chunks (list) – List of chunk start and end positions [(s_i, e_i), (s_i+1, e_i+1), …]