create_dataset#

caput.memdata.MemGroup.create_dataset(name, shape=None, dtype=None, data=None, distributed=False, distributed_axis=None, chunks=None, compression=None, compression_opts=None, **kwargs)[source]#

Create a new dataset.

Parameters:
namestr

Dataset name.

shapetuple[int, …] | None

Shape tuple. This gives the global shape for a distributed dataset.

dtypedtype | None

Numpy datatype of the dataset.

dataarray_like

Data array to initialise from. Uses a view of the original where possible.

distributedbool

Create a distributed dataset or not.

distributed_axisint

Axis to distribute the data over. If specified with initialisation data this will cause create a copy with the correct distribution.

chunkstuple[int, …] | None

Chunking arguments for dataset

compressionstr | int | None

Name or identifier of HDF5 or Zarr compression filter.

compression_optsdict | None

See HDF5 and Zarr documentation for compression filters. Compression options for the dataset.

**kwargsany

Arbitrary keyword arguments.

Returns:
datasetMemDataset

The created dataset.