bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / _external / array_api_extra / _lib / _utils / _helpers / ndindex
function
scipy._external.array_api_extra._lib._utils._helpers:ndindex
Signature
def ndindex(*x: int) → Generator[tuple[int, ...]]Summary
Generate all N-dimensional indices for a given array shape.
Extended Summary
Given the shape of an array, an ndindex instance iterates over the N-dimensional index of the array. At each iteration a tuple of indices is returned, the last dimension is iterated over first.
This has an identical API to numpy.ndindex.
Parameters
*x: intThe shape of the array.
Aliases
scipy.differentiate.xpx._delegation._funcs.ndindex