Table of Contents

Enum DTypeFlags

Namespace
NumSharp
Assembly
NumSharp.dll

Flags describing a DTypeMeta — the DType CLASS — mirroring NumPy's NPY_DT_* bits (dtypemeta.h / dtype_api.h): NPY_DT_LEGACY = 1, NPY_DT_ABSTRACT = 2, NPY_DT_PARAMETRIC = 4, NPY_DT_NUMERIC = 8.

[Flags]
public enum DTypeFlags

Fields

None = 0

No flags.

Legacy = 1

A "legacy" dtype in NumPy's sense: 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's StringDType would not).

Abstract = 2

An abstract DType: it has no instances and exists only to participate in promotion — the NEP 50 Python-scalar classes _PyLongDType / _PyFloatDType / _PyComplexDType.

Parametric = 4

A parametric DType: its instances carry parameters beyond the class (a datetime unit, a string length), so promote_types must run common_instance instead of returning the class default.

Numeric = 8

A numeric DType (PyTypeNum_ISNUMBER): bool, integers, floats, complex.