MemDatasetCommon#
- class caput.memdata.MemDatasetCommon(shape, dtype, chunks=None, compression=None, compression_opts=None, **kwargs)[source]#
Bases:
MemDatasetIn memory implementation of
h5py.Dataset.Inherits from
MemDataset. Encapsulates a numpy array mocked up to look like an hdf5 dataset. Similar to h5py datasets, this implements slicing like a numpy array but as it is not actually a many operations won’t work (e.g. ufuncs).- Parameters:
- shape
tuple[int, …] Shape of array to initialise.
- dtype
dtype Type of array to create.
- chunks
tuple[int, …] Chunk sizes. If None, dataset is not chunked.
- 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.
- **kwargsAny
Arbitrary keyword arguments passed to
MemDatasetconstructor.
- shape
Methods#
|
Index directly into the data array. |
|
Index directly into the data array and set values at that location. |
|
Initialise from a numpy array. |