rex.utilities.utilities.split_sites_list

split_sites_list(sites, slice_size)[source]

Split sites into sub-lists of ~ size slice_size

Parameters:
  • sites (list) – Sites to extract as a list or numpy object to extract (sites is synonymous with gids aka spatial indices)

  • slice_size (int) – Number of sites in each slice to extract either on each worker, or in series

Returns:

slices (list) – List of slices to extract