Method all
static member all: Tensor<bool> -> bool
Checks if all elements of the tensor are true.
Declaration
static member all: src:Tensor<bool> -> bool
Parameters
Type | Name | Description |
---|---|---|
Tensor<bool> | src | The tensor containing the source values. |
Returns
Type | Description |
---|---|
bool | A scalar containing the result of this operation. |
Remarks
It is checked whether all elements of the tensor are true. If so, true is returned; otherwise false is returned.
If the tensor is empty true is returned.
Examples
let a = HostTensor.ofList2D [[true; true; true]
[false; true; true]]
let b = Tensor.all a // b = false