Enum NDArrayMethodFlags
Flags characterizing the transfer (cast/copy) functions set up by an iterator. Matches NumPy's NPY_ARRAYMETHOD_FLAGS (dtype_api.h:66).
Packed into the top 8 bits of ItFlags at offset TRANSFERFLAGS_SHIFT (=24). Retrieved via GetTransferFlags() — the preferred way to check whether the iteration can run without the GIL (in NumPy) or might set FP errors.
[Flags]
public enum NDArrayMethodFlags : uint
- Extension Methods
Fields
None = 0No special transfer characteristics.
REQUIRES_PYAPI = 1Flag for whether the GIL is required. Never set in NumSharp (no Python). (NPY_METH_REQUIRES_PYAPI)
NO_FLOATINGPOINT_ERRORS = 2Function cannot set floating point error flags. Can skip FP error setup. Always set in NumSharp (.NET casts never raise FPE). (NPY_METH_NO_FLOATINGPOINT_ERRORS)
SUPPORTS_UNALIGNED = 4Method supports unaligned access. Always set in NumSharp (raw byte pointer loops). (NPY_METH_SUPPORTS_UNALIGNED)
IS_REORDERABLE = 8Used for reductions to allow reordering. Applies to normal ops too. (NPY_METH_IS_REORDERABLE)
RUNTIME_FLAGS = REQUIRES_PYAPI | NO_FLOATINGPOINT_ERRORSMask of flags that can change at runtime. (NPY_METH_RUNTIME_FLAGS)