Method isFinite
static member isFinite: Tensor<'T> -> Tensor<bool>
Element-wise finity check (not -Inf, Inf or NaN).
Declaration
static member isFinite: a:Tensor<'T> -> Tensor<bool>
Parameters
Type | Name | Description |
---|---|---|
Tensor<'T> | a | The tensor to apply this operation to. |
Returns
Type | Description |
---|---|
Tensor<bool> | A new tensor containing the result of this operation. |
Remarks
Checks each element of the specified tensor for finity (not -Inf, Inf or NaN) and returns
the results as a new tensor of type bool
.
Examples
let a = HostTensor.ofList [-infinity; -3.0; nan; 3.0; infinity]
let b = isFinite a // b = [false; true; false; true; false]