dpnp.all
- dpnp.all(x1, axis=None, out=None, keepdims=False)[source]
Test whether all array elements along a given axis evaluate to True.
For full documentation refer to
numpy.all
.Limitations
Input array is supported as
dpnp.ndarray
. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types. Parameteraxis
is supported only with default valueNone
. Parameterout
is supported only with default valueNone
. Parameterkeepdims
is supported only with default valueFalse
.See also
dpnp.any
Test whether any element along a given axis evaluates to True.
Notes
Not a Number (NaN), positive infinity and negative infinity evaluate to True because these are not equal to zero.
Examples
>>> import dpnp as np >>> x = np.array([[True, False], [True, True]]) >>> np.all(x) False >>> x2 = np.array([-1, 4, 5]) >>> np.all(x2) True >>> x3 = np.array([1.0, np.nan]) >>> np.all(x3) True