Class DType
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
public class DType
- Inheritance
-
DType
- Inherited Members
- Extension Methods
Remarks
Constructors
DType(Type)
Initializes a new instance of the object class.
public DType(Type type)
Parameters
typeType
Fields
_kind_list_map
protected static readonly FrozenDictionary<NPTypeCode, char> _kind_list_map
Field Value
byteorder
A character indicating the byte-order of this data-type object.
One of:
'=' native
'<' little-endian
'>' big-endian
'|' not applicable
public char byteorder
Field Value
itemsize
The size of the dtype in bytes.
public int itemsize
Field Value
kind
A character code (one of ‘biufcmMOSUV’) identifying the general kind of data.
b boolean
i signed integer
u unsigned integer
f floating-point
c complex floating-point
m timedelta
M datetime
O object
S(byte-)string
U Unicode
V void
public char kind
Field Value
name
The name of this dtype.
public string name
Field Value
type
The actual type this dtype represents.
public Type type
Field Value
typecode
The NumSharp type code.
public NPTypeCode typecode
Field Value
Properties
char
A unique character code for each of the 21 different built-in types.
public char @char { get; }
Property Value
Methods
newbyteorder(char)
Return a new dtype with a different byte order. Changes are also made in all fields and sub-arrays of the data type.
public DType newbyteorder(char new_order = 'S')
Parameters
new_ordercharByte order to force; a value from the byte order specifications below.
The default value (‘S’) results in swapping the current byte order.
new_order codes can be any of:
‘S’ - swap dtype from current to opposite endian
'=' - native order
'<' - little-endian
'>' - big-endian
'|' - ignore(no change to byte order)
The code does a case-insensitive check on the first letter of new_order for these alternatives.
For example, any of ‘>’ or ‘B’ or ‘b’ or ‘brian’ are valid to specify big-endian.
Returns
- DType
New dtype object with the given change to the byte order.