blosc2.all#
- blosc2.all(ndarr: NDArray | NDField | C2Array | LazyExpr, axis: int | tuple[int] | None = None, keepdims: bool = False, **kwargs: Any) ndarray | NDArray | bool #
Test whether all array elements along a given axis evaluate to True.
The parameters are documented in the
min
.- Returns:
all_along_axis – The result of the evaluation along the axis.
- Return type:
np.ndarray or NDArray or scalar
References
Examples
>>> import numpy as np >>> import blosc2 >>> data = np.array([True, True, False, True, True, True]) >>> ndarray = blosc2.asarray(data) >>> # Test if all elements are True along the default axis (flattened array) >>> result_flat = blosc2.all(ndarray) >>> print("All elements are True (flattened):", result_flat) All elements are True (flattened): False