ch5mpy.H5Array
- class ch5mpy.H5Array(dset)[source]
Wrapper around Dataset objects to interface with numpy’s API.
Attributes
Get the size of a chunk (i.e.
Methods
Cast an H5Array to a specified dtype.
Resize an H5Array by removing amount elements along the selected axis.
Resize an H5Array by adding amount elements along the selected axis.
- rtype:
ChunkIterator
- rtype:
PairedChunkIterator
Cast an H5Array to any object type.
- rtype:
- Parameters:
dset (Dataset[_T] | DatasetWrapper[_T]) –
Attributes
Methods
- H5Array.astype(dtype, inplace=False)[source]
Cast an H5Array to a specified dtype. This does not perform a copy, it returns a wrapper around the underlying H5 dataset.
- H5Array.contract(amount, axis=None)[source]
Resize an H5Array by removing amount elements along the selected axis.
- H5Array.expand(amount, axis=None)[source]
Resize an H5Array by adding amount elements along the selected axis.
- H5Array.iter_chunks(keepdims=False)[source]
- Return type:
ChunkIterator- Parameters:
keepdims (bool) –
- H5Array.maptype(otype)[source]
Cast an H5Array to any object type. This extends H5Array.astype() to any type <T>, where it is required that an object <T> can be constructed as T(v) for any value <v> in the dataset.