Array¶
Minimal typing protocol for array-like objects compatible with blosc2.
This protocol describes the basic interface required by blosc2 arrays. It is implemented by blosc2 classes (NDArray, NDField, LazyArray, C2Array, ProxyNDSource…) and is compatible with NumPy arrays and other array-like containers (e.g., PyTorch, TensorFlow, Dask, Zarr, …).
- class blosc2.Array(*args, **kwargs)[source]¶
A typing protocol for array-like objects with basic array interface.
This protocol describes the basic interface required by blosc2 arrays. It is implemented by blosc2 classes (NDArray, NDField, LazyArray, C2Array, ProxyNDSource…) and is compatible with NumPy arrays and other array-like containers (e.g., PyTorch, TensorFlow, Dask, Zarr, …).
- Attributes:
dtype
The data type of the array.
shape
The shape of the array.
- Special Methods:
__len__
()The length of the array.
__getitem__
(key)Get items from the array.