Enum DTypeFlags
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
Flags describing a DTypeMeta — the DType CLASS — under NumPy's own names, the NPY_DT_*
bits of dtypemeta.h / dtype_api.h with NumPy's values (NPY_DT_LEGACY = 1,
NPY_DT_ABSTRACT = 2, NPY_DT_PARAMETRIC = 4, NPY_DT_NUMERIC = 8), so a flags word compares
bit for bit with NumPy's PyArray_DTypeMeta.flags.
[Flags]
public enum DTypeFlags
Fields
None = 0No flags (the C# zero value; NumPy names no empty word).
NPY_DT_LEGACY = 1NPY_DT_LEGACY: one of the builtin classes whose descriptor layout predates NEP 41/42 (every storage-backed NumSharp dtype and the datetime pair carry it; NEP 55'sStringDTypewould not). Read in Python asDType._legacy.NPY_DT_ABSTRACT = 2NPY_DT_ABSTRACT: the class has no instances and exists only to take part in promotion — the NEP 50 Python-scalar classes_PyLongDType/_PyFloatDType/_PyComplexDType. Read in Python asDType._abstract.NPY_DT_PARAMETRIC = 4NPY_DT_PARAMETRIC: the instances carry parameters beyond the class (a datetime unit, a string length), sopromote_typesrunscommon_instanceinstead of returning the class default. Read in Python asDType._parametric.NPY_DT_NUMERIC = 8NPY_DT_NUMERIC(PyTypeNum_ISNUMBER): bool, the integers, the floats and complex. Read in Python asDType._is_numeric.
Remarks
The members keep NumPy's C spellings, as NPY_CASTING and NPY_TYPES do, because the
NumPy surface of NumSharp is case-sensitive to NumPy. Python reads the same bits through the class attributes
_legacy, _abstract, _parametric and _is_numeric, which DTypeMeta
exposes under those names. None is the C# flags-enum zero; NumPy has no name for an empty word.