all_true

arrayfire.all_true(array: Array, axis: None = None) bool
arrayfire.all_true(array: Array, axis: int) Array

Check if all the elements along a specified dimension are true.

Parameters

arrayArray

Multi-dimensional ArrayFire array.

axisint, optional, default: None

Dimension along which the product is required.

Returns

bool | Array

An ArrayFire array containing True if all elements in array along the specified dimension are True. If axis is None, the output is True if array does not have any zeros, else False.

Note

If axis is None, output is True if the array does not have any zeros, else False.