Enum NDIterPerOpFlags
Per-operand flags passed to iterator construction. Bit values match NumPy's NPY_ITER_* per-operand constants exactly (see numpy/_core/include/numpy/ndarraytypes.h). All values occupy the high 16 bits per NumPy's NPY_ITER_PER_OP_FLAGS mask (0xffff0000).
[Flags]
public enum NDIterPerOpFlags : uint
- Extension Methods
Fields
None = 0READWRITE = 65536Operand is read-write. (NPY_ITER_READWRITE)
READONLY = 131072Operand is read-only. (NPY_ITER_READONLY)
WRITEONLY = 262144Operand is write-only. (NPY_ITER_WRITEONLY)
NBO = 524288Require native byte order. (NPY_ITER_NBO)
ALIGNED = 1048576Require aligned data. (NPY_ITER_ALIGNED)
CONTIG = 2097152Require contiguous data. (NPY_ITER_CONTIG)
COPY = 4194304Copy operand data. (NPY_ITER_COPY)
UPDATEIFCOPY = 8388608Update original if copy is made. (NPY_ITER_UPDATEIFCOPY)
ALLOCATE = 16777216Allocate output array if null. (NPY_ITER_ALLOCATE)
NO_SUBTYPE = 33554432Don't allocate with subtype. (NPY_ITER_NO_SUBTYPE)
VIRTUAL = 67108864Virtual operand slot (no backing array, temporary data only). (NPY_ITER_VIRTUAL)
NO_BROADCAST = 134217728Don't broadcast this operand. (NPY_ITER_NO_BROADCAST)
WRITEMASKED = 268435456Write only where mask is true. (NPY_ITER_WRITEMASKED)
ARRAYMASK = 536870912This operand is an array mask. (NPY_ITER_ARRAYMASK)
OVERLAP_ASSUME_ELEMENTWISE_PER_OP = 1073741824Assume iterator-order access for COPY_IF_OVERLAP. (NPY_ITER_OVERLAP_ASSUME_ELEMENTWISE)
When COPY_IF_OVERLAP is set and this operand has this flag, the overlap check can short-circuit: if both operands point to the same buffer with identical memory layout and no internal overlap, no copy is needed (because the caller's inner loop accesses data strictly element-by-element in iterator order). NumPy nditer_constr.c:3130-3137 (same-data overlap short-circuit).