grids.mixins.chunking.GridChunkingMixin.iter_chunk_indices#

GridChunkingMixin.iter_chunk_indices(axes: AxesInput | None = None, *, pbar: bool = True, pbar_kwargs: Dict[str, Any] | None = None) Iterator[Tuple[int, ...]][source]#

Iterate over chunk indices for the grid along specified axes.

This yields the index tuple (e.g., (i, j, k)) for each chunk along the selected axes. It does not compute slices or include ghost/halo metadata — it is simply the raw chunk index iterator.

Parameters:
  • axes (str or list of str, optional) –

    The names of the axes to include in the slice. If None, all axes are used. This determines the number of slice objects returned in the output tuple — one slice per selected axis.

    Note

    Regardless of the ordering of axes, the axes are reordered to match canonical ordering as defined by the coordinate system.

  • pbar (bool, default True) – Whether to display a tqdm progress bar during iteration.

  • pbar_kwargs (dict, optional) – Additional keyword arguments to pass to tqdm.

Yields:

tuple of int – The current chunk index along the selected axes.