Back to Core Functions
all
Test if all elements are nonzero
Syntax
B = all(A) B = all(A, dim)
Description
Returns 1 if all elements of A are nonzero, 0 otherwise. With a dimension argument, operates along that dimension.
Parameters
| Name | Description |
|---|---|
| A | Input array (scalar or NDArray) |
| dim(optional) | Dimension to operate along (1-indexed) |
Returns
1 if all elements are nonzero, 0 otherwise