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.File or zarr.File.

Parameters:
filenamepath_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.

commMPI.Comm | None

MPI communicator to distributed over. If None use MPI.COMM_WORLD.

selectionsdict

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_formatFileFormat | None

File format to use. Default is None, i.e. guess from the name.

**kwargs

Arbitrary keyword arguments.

Returns:
groupMemGroup

Root group of loaded file.