DataclassDict
- class lib.align.objects.DataclassDict
Bases:
objectParent DataClass that has methods for loading to and from a dict for data serialization
Methods Summary
from_dict(data_dict)Load the contents from a serialized python dict into this dataclass
to_dict()Obtain the contents of the dataclass object as a python dictionary
Methods Documentation
- classmethod from_dict(data_dict: dict[str, Any]) Self
Load the contents from a serialized python dict into this dataclass
- Parameters:
data_dict (dict[str, Any]) – The data to load into the dataclass
- Return type:
Self
- to_dict() dict[str, Any]
Obtain the contents of the dataclass object as a python dictionary
- Return type:
The dataclass object as a python dictionary, with numpy arrays converted to lists
- classmethod from_dict(data_dict: dict[str, Any]) Self
Load the contents from a serialized python dict into this dataclass
- Parameters:
data_dict (dict[str, Any]) – The data to load into the dataclass
- Return type:
Self
- to_dict() dict[str, Any]
Obtain the contents of the dataclass object as a python dictionary
- Return type:
The dataclass object as a python dictionary, with numpy arrays converted to lists