from_file#
- classmethod caput.memdata.MemGroup.from_file(filename, distributed=False, hints=True, comm=None, selections={}, convert_dataset_strings=False, convert_attribute_strings=True, file_format=None, **kwargs)[source]#
Create a new instance by copying from a file group.
Any keyword arguments are passed on to the constructor for
h5py.Fileorzarr.File.- Parameters:
- filename
path_like Name of file to load.
- distributedbool
Whether to load file in distributed mode.
- hintsbool
If in distributed mode use hints to determine whether datasets are distributed or not.
- comm
MPI.Comm|None MPI communicator to distributed over. If
NoneuseMPI.COMM_WORLD.- selections
dict Map dataset names to axis selections as valid numpy indexes.
- convert_attribute_strings: bool
Try and convert attribute string types to unicode. Default is
True.- convert_dataset_stringsbool
Try and convert dataset string types to unicode. Default is
False.- file_format
FileFormat|None File format to use. Default is
None, i.e. guess from the name.- **kwargs
Arbitrary keyword arguments.
- filename
- Returns:
- group
MemGroup Root group of loaded file.
- group