Table of Contents

Class np.dtypes

Namespace
NumSharp
Assembly
NumSharp.dll

numpy.dtypes (NEP 56 / NumPy 1.25+): the DType CLASSES — np.dtypes.Float64DType is type(np.dtype('f8')). Each member is the live DTypeMeta singleton; its Instantiate() is NumPy's class call (Int8DType()dtype('int8'); DateTime64DType() raises the "Preliminary-API … can only be instantiated using np.dtype(...)" TypeError), and Meta is type(dtype).

[ModuleName("np.dtypes")]
public static class np.dtypes
Inheritance
np.dtypes
Inherited Members

Remarks

Names and aliases are NumPy 2.4.2's numpy.dtypes.all: ByteDType/UByteDType for int8/uint8, ShortDType/UShortDType for int16/uint16, IntDType/UIntDType for int32/uint32, LongLongDType/ULongLongDType for int64/uint64, and the platform-dependent LongDType/ULongDType (C long: 32-bit on Windows and 32-bit hosts, 64-bit on LP64 Unix). LongDoubleDType and CLongDoubleDType alias the 64-bit float / complex classes — NumSharp has no extended precision, exactly as NumPy's win-amd64 build. The classes NumPy has and NumSharp does not (Complex64DType, StrDType, BytesDType, StringDType, ObjectDType, VoidDType) are absent rather than stubbed; DecimalDType and CharDType are NumSharp-only.

Properties

BoolDType

numpy.dtypes.BoolDType.

public static LegacyBuiltinDTypeMeta BoolDType { get; }

Property Value

LegacyBuiltinDTypeMeta

ByteDType

numpy.dtypes.ByteDType — alias of Int8DType.

public static LegacyBuiltinDTypeMeta ByteDType { get; }

Property Value

LegacyBuiltinDTypeMeta

CLongDoubleDType

numpy.dtypes.CLongDoubleDType — collapses onto Complex128DType.

public static LegacyBuiltinDTypeMeta CLongDoubleDType { get; }

Property Value

LegacyBuiltinDTypeMeta

CharDType

NumSharp-only: the char class (no NumPy analog; promotes as uint16; type number 257).

public static LegacyBuiltinDTypeMeta CharDType { get; }

Property Value

LegacyBuiltinDTypeMeta

Complex128DType

numpy.dtypes.Complex128DType.

public static LegacyBuiltinDTypeMeta Complex128DType { get; }

Property Value

LegacyBuiltinDTypeMeta

DateTime64DType

numpy.dtypes.DateTime64DType — parametric; descriptor-level in Stage A.

public static DatetimeDTypeMeta DateTime64DType { get; }

Property Value

DatetimeDTypeMeta

DecimalDType

NumSharp-only: the decimal class (no NumPy analog; type number 256, isbuiltin == 2).

public static LegacyBuiltinDTypeMeta DecimalDType { get; }

Property Value

LegacyBuiltinDTypeMeta

Float16DType

numpy.dtypes.Float16DType.

public static LegacyBuiltinDTypeMeta Float16DType { get; }

Property Value

LegacyBuiltinDTypeMeta

Float32DType

numpy.dtypes.Float32DType.

public static LegacyBuiltinDTypeMeta Float32DType { get; }

Property Value

LegacyBuiltinDTypeMeta

Float64DType

numpy.dtypes.Float64DType.

public static LegacyBuiltinDTypeMeta Float64DType { get; }

Property Value

LegacyBuiltinDTypeMeta

Int16DType

numpy.dtypes.Int16DType.

public static LegacyBuiltinDTypeMeta Int16DType { get; }

Property Value

LegacyBuiltinDTypeMeta

Int32DType

numpy.dtypes.Int32DType.

public static LegacyBuiltinDTypeMeta Int32DType { get; }

Property Value

LegacyBuiltinDTypeMeta

Int64DType

numpy.dtypes.Int64DType.

public static LegacyBuiltinDTypeMeta Int64DType { get; }

Property Value

LegacyBuiltinDTypeMeta

Int8DType

numpy.dtypes.Int8DType.

public static LegacyBuiltinDTypeMeta Int8DType { get; }

Property Value

LegacyBuiltinDTypeMeta

IntDType

numpy.dtypes.IntDType (C int) — alias of Int32DType.

public static LegacyBuiltinDTypeMeta IntDType { get; }

Property Value

LegacyBuiltinDTypeMeta

LongDType

numpy.dtypes.LongDType (C long): Int32DType on Windows / 32-bit hosts, Int64DType on LP64 Unix.

public static LegacyBuiltinDTypeMeta LongDType { get; }

Property Value

LegacyBuiltinDTypeMeta

LongDoubleDType

numpy.dtypes.LongDoubleDType — collapses onto Float64DType (no extended precision, as on NumPy's win-amd64 build).

public static LegacyBuiltinDTypeMeta LongDoubleDType { get; }

Property Value

LegacyBuiltinDTypeMeta

LongLongDType

numpy.dtypes.LongLongDType — alias of Int64DType.

public static LegacyBuiltinDTypeMeta LongLongDType { get; }

Property Value

LegacyBuiltinDTypeMeta

ShortDType

numpy.dtypes.ShortDType — alias of Int16DType.

public static LegacyBuiltinDTypeMeta ShortDType { get; }

Property Value

LegacyBuiltinDTypeMeta

TimeDelta64DType

numpy.dtypes.TimeDelta64DType — parametric; descriptor-level in Stage A.

public static DatetimeDTypeMeta TimeDelta64DType { get; }

Property Value

DatetimeDTypeMeta

UByteDType

numpy.dtypes.UByteDType — alias of UInt8DType.

public static LegacyBuiltinDTypeMeta UByteDType { get; }

Property Value

LegacyBuiltinDTypeMeta

UInt16DType

numpy.dtypes.UInt16DType.

public static LegacyBuiltinDTypeMeta UInt16DType { get; }

Property Value

LegacyBuiltinDTypeMeta

UInt32DType

numpy.dtypes.UInt32DType.

public static LegacyBuiltinDTypeMeta UInt32DType { get; }

Property Value

LegacyBuiltinDTypeMeta

UInt64DType

numpy.dtypes.UInt64DType.

public static LegacyBuiltinDTypeMeta UInt64DType { get; }

Property Value

LegacyBuiltinDTypeMeta

UInt8DType

numpy.dtypes.UInt8DType.

public static LegacyBuiltinDTypeMeta UInt8DType { get; }

Property Value

LegacyBuiltinDTypeMeta

UIntDType

numpy.dtypes.UIntDType (C unsigned int) — alias of UInt32DType.

public static LegacyBuiltinDTypeMeta UIntDType { get; }

Property Value

LegacyBuiltinDTypeMeta

ULongDType

numpy.dtypes.ULongDType (C unsigned long): UInt32DType on Windows / 32-bit hosts, UInt64DType on LP64 Unix.

public static LegacyBuiltinDTypeMeta ULongDType { get; }

Property Value

LegacyBuiltinDTypeMeta

ULongLongDType

numpy.dtypes.ULongLongDType — alias of UInt64DType.

public static LegacyBuiltinDTypeMeta ULongLongDType { get; }

Property Value

LegacyBuiltinDTypeMeta

UShortDType

numpy.dtypes.UShortDType — alias of UInt16DType.

public static LegacyBuiltinDTypeMeta UShortDType { get; }

Property Value

LegacyBuiltinDTypeMeta