Method anyAxis
static member anyAxis: int -> Tensor<bool> -> Tensor<bool>
Checks if any element along the specified axis is true.
Declaration
static member anyAxis: ax:int -> src:Tensor<bool> -> Tensor<bool>
Parameters
Type | Name | Description |
---|---|---|
int | ax | The axis to check along. |
Tensor<bool> | src | The tensor containing the source values. |
Returns
Type | Description |
---|---|
Tensor<bool> | A new tensor containing the result of this operation. |
Remarks
It is checked whether any element along the specified axis is true. If so, true is returned; otherwise false is returned.
If the tensor is empty false is returned.
Examples
let a = HostTensor.ofList2D [[true; true; true]
[false; true; true]]
let b = Tensor.anyAxis 1 a // b = [true; true]