Table of Contents

Enum ArrayFlags

Namespace
NumSharp
Assembly
NumSharp.dll

NumPy-aligned array flags. Cached at shape creation for O(1) access. Matches numpy/core/include/numpy/ndarraytypes.h flag definitions.

[Flags]
public enum ArrayFlags

Fields

None = 0

No flags set.

C_CONTIGUOUS = 1

Data is C-contiguous (row-major, last dimension varies fastest).

F_CONTIGUOUS = 2

Data is F-contiguous (column-major).

OWNDATA = 4

Array owns its data buffer (NumPy's NPY_ARRAY_OWNDATA). Not derivable from dims/strides — maintained by OnReshaped() at the storage funnels: set when the storage allocated its buffer (NumPy ctors.c: fa->flags |= NPY_ARRAY_OWNDATA when data == NULL), cleared for views and foreign-memory wraps (base != NULL ⟹ !OWNDATA).

ALIGNED = 256

Data is aligned for the CPU (always true for managed allocations).

WRITEABLE = 1024

Data is writeable (false for broadcast views).

BROADCASTED = 4096

Shape has a broadcast dimension (stride=0 with dim > 1).