MemGroup#

class caput.memdata.MemGroup(distributed=False, comm=None)[source]#

Bases: _BaseGroup

In memory implementation of the h5py.Group.

This class doubles as the memory implementation of h5py.File, object, since the distinction between a file and a group for in-memory data is moot.

Parameters:
distributedbool

Allow memh5 object to hold distributed datasets.

commMPI.Comm | None

MPI Communicator to distributed over. If not set, use MPI.COMM_WORLD.

property mode[source]#

String indicating if group is readonly (“r”) or read-write (“r+”).

MemGroup is always read-write.

Methods#

create_dataset(name[, shape, dtype, data, ...])

Create a new dataset.

create_group(name)

Create a group within the storage tree.

dataset_common_to_distributed(name[, distributed_axis])

Convert a common dataset to a distributed one.

dataset_distributed_to_common(name)

Convert a distributed dataset to a common one.

from_file(filename[, distributed, hints, comm, ...])

Create a new instance by copying from a file group.

from_group(group)

Create a new instance by deep copying an existing group.

from_hdf5(filename[, distributed, hints, comm, ...])

Create a new instance by copying from an hdf5 group.

to_file(filename[, mode, hints, ...])

Replicate object on disk in an hdf5 or zarr file.

to_hdf5(filename[, mode, hints, ...])

Replicate object on disk in an hdf5 file.