Script.any

Contents

Script.any

Script.any(x, *, dim=None, keepdim=False, out=None)

Test whether any element is non-zero along the specified dimension(s).

Parameters:
  • x (RegisterTensor) – Input boolean tensor.

  • dim (int | Sequence[int], optional) – Dimension(s) to reduce. If not provided, reduces all dimensions.

  • keepdim (bool) – If True, retains the reduced dimension with size 1. Default is False.

  • out (RegisterTensor, optional) – Output tensor. If not provided, a new tensor is allocated.

Returns:

ret – Boolean tensor with the reduction result.

Return type:

RegisterTensor

Notes

  • Thread group: Can be executed by any sized thread group.