dpctl.tensor.all(x, axis=None, keepdims=False)[source]

Tests whether all input array elements evaluate to True along a given axis.

  • x (usm_ndarray) – Input array.

  • axis (Optional[Union[int, Tuple[int,...]]]) – Axis (or axes) along which to perform a logical AND reduction. When axis is None, a logical AND reduction is performed over all dimensions of x. If axis is negative, the axis is counted from the last dimension to the first. Default: None.

  • keepdims (bool, optional) – If True, the reduced axes are included in the result as singleton dimensions, and the result is broadcastable to the input array shape. If False, the reduced axes are not included in the result. Default: False.


An array with a data type of bool containing the results of the logical AND reduction.

Return type: