TypeCode#

class biotite.structure.io.pdbx.TypeCode(*values)[source]#

Bases: IntEnum

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

static from_dtype(dtype: dtype | int | TypeCode) → TypeCode#

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() → str#

Convert this type code to a NumPy dtype.

Returns:
dtypestr

The corresponding data type as a NumPy dtype string.

INT8 = 1#
INT16 = 2#
INT32 = 3#
UINT8 = 4#
UINT16 = 5#
UINT32 = 6#
FLOAT32 = 32#
FLOAT64 = 33#