ProxyNDSource¶
Interface for NDim sources in Proxy. For example, a NDArray, a HDF5 dataset, etc. For a simpler source, see ProxySource.
- class blosc2.ProxyNDSource[source]¶
Base interface for NDim sources in Proxy.
- Attributes:
Methods
aget_chunk
(nchunk)Return the compressed chunk in
self
asynchronously.get_chunk
(nchunk)Return the compressed chunk in
self
.- async aget_chunk(nchunk: int) bytes [source]¶
Return the compressed chunk in
self
asynchronously.- Parameters:
nchunk¶ (int) – The index of the chunk to retrieve.
- Returns:
out – The compressed chunk.
- Return type:
bytes object
Notes
This method is optional, and only available if the source has an async aget_chunk method.
- abstract get_chunk(nchunk: int) bytes [source]¶
Return the compressed chunk in
self
.- Parameters:
nchunk¶ (int) – The unidimensional index of the chunk to retrieve.
- Returns:
out – The compressed chunk.
- Return type:
bytes object
- abstract property blocks: tuple¶
The block shape of the source.
- abstract property chunks: tuple¶
The chunk shape of the source.
- property cparams: CParams¶
The compression parameters of the source.
This property is optional and can be overridden if the source has a different compression configuration.
- abstract property dtype: dtype¶
The dtype of the source.
- abstract property shape: tuple¶
The shape of the source.