ndindex#

named_arrays.ndindex(shape, axis_ignored=None)#

An analogue of numpy.ndindex for named axes.

This version adds a new argument, axis_ignored, to allow some of the axes to be excluded from the returned iterator.

Parameters:
  • shape (dict[str, int]) – The size of each dimension of the array to index over.

  • axis_ignored (None | str | Sequence[str]) – The axes to ignore when iterating.

Return type:

Iterator[dict[str, int]]