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:
- name
str Dataset name.
- shape
tuple[int, …] |None Shape tuple. This gives the global shape for a distributed dataset.
- dtype
dtype|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_axis
int Axis to distribute the data over. If specified with initialisation data this will cause create a copy with the correct distribution.
- chunks
tuple[int, …] |None Chunking arguments for dataset
- compression
str|int|None Name or identifier of HDF5 or Zarr compression filter.
- compression_opts
dict|None See HDF5 and Zarr documentation for compression filters. Compression options for the dataset.
- **kwargs
any Arbitrary keyword arguments.
- name
- Returns:
- dataset
MemDataset The created dataset.
- dataset