biotite.structure.io.pdbx.CIFData

class biotite.structure.io.pdbx.CIFData(array, dtype=None)[source]

Bases: object

This class represents the data in a CIFColumn.

Parameters
arrayarray_like or int or float or str

The data array to be stored. If a single item is given, it is converted into an array.

dtypedtype-like, optional

If given, the dtype the stored array should be converted to.

Notes

When a CIFFile is written, the data type is automatically converted to string. The other way around, when a CIFFile is read, the data type is always a string type.

Examples

>>> data = CIFData([1, 2, 3])
>>> print(data.array)
[1 2 3]
>>> print(len(data))
3
>>> # A single item is converted into an array
>>> data = CIFData("apple")
>>> print(data.array)
['apple']
Attributes
arrayndarray

The stored data array.

static subcomponent_class()
static supercomponent_class()