biotite.structure.io.pdbx.TypeCode

class biotite.structure.io.pdbx.TypeCode(value)[source]

Bases: IntEnum

This enum type represents integers that represent data types in BinaryCIF.

INT8 = 1
INT16 = 2
INT32 = 3
UINT8 = 4
UINT16 = 5
UINT32 = 6
FLOAT32 = 32
FLOAT64 = 33
static from_dtype(dtype)

Convert a NumPy dtype to a BinaryCIF type code.

Parameters
dtypedtype or int or TypeCode

The data type to be converted. If already a type code, it is simply returned.

Returns
type_codeTypeCode

The corresponding type code.

to_dtype()

Convert this type code to a NumPy dtype.

Returns
dtypedtype

The corresponding data type.