public enum DataType extends Enum<DataType>
Enum Constant and Description |
---|
BFLOAT16 |
BOOL |
BYTE
Deprecated.
Replaced by
INT8 , use that instead |
COMPRESSED |
DOUBLE |
FLOAT |
HALF
Deprecated.
Replaced by
FLOAT16 , use that instead |
INT
Deprecated.
Replaced by
INT32 , use that instead |
LONG
Deprecated.
Replaced by
INT64 , use that instead |
SHORT
Deprecated.
Replaced by
INT16 , use that instead |
UBYTE
Deprecated.
Replaced by
UINT8 , use that instead |
UINT16 |
UINT32 |
UINT64 |
UNKNOWN |
UTF8 |
Modifier and Type | Field and Description |
---|---|
static DataType |
FLOAT16 |
static DataType |
INT16 |
static DataType |
INT32 |
static DataType |
INT64 |
static DataType |
INT8 |
static DataType |
UINT8 |
Modifier and Type | Method and Description |
---|---|
static DataType |
fromInt(int type) |
static DataType |
fromNumpy(String numpyDtypeName) |
boolean |
isFPType() |
boolean |
isIntType() |
boolean |
isNumerical()
Return true if the value is numerical.
Equivalent to this != UTF8 && this != COMPRESSED && this != UNKNOWN Note: Boolean values are considered numerical (0/1) |
boolean |
isSigned() |
int |
precision() |
int |
toInt() |
static DataType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DataType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
int |
width() |
public static final DataType DOUBLE
public static final DataType FLOAT
@Deprecated public static final DataType HALF
FLOAT16
, use that instead@Deprecated public static final DataType LONG
INT64
, use that instead@Deprecated public static final DataType INT
INT32
, use that instead@Deprecated public static final DataType SHORT
INT16
, use that instead@Deprecated public static final DataType UBYTE
UINT8
, use that instead@Deprecated public static final DataType BYTE
INT8
, use that insteadpublic static final DataType BOOL
public static final DataType UTF8
public static final DataType COMPRESSED
public static final DataType BFLOAT16
public static final DataType UINT16
public static final DataType UINT32
public static final DataType UINT64
public static final DataType UNKNOWN
public static final DataType FLOAT16
public static final DataType INT32
public static final DataType INT64
public static final DataType INT16
public static final DataType INT8
public static final DataType UINT8
public static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static DataType fromInt(int type)
public int toInt()
public boolean isFPType()
public boolean isIntType()
public boolean isNumerical()
this != UTF8 && this != COMPRESSED && this != UNKNOWN
public boolean isSigned()
public int precision()
public int width()
Copyright © 2020. All rights reserved.