Operator ( ~+ )
static member ( ~+ ): Tensor<'T> -> Tensor<'T>
Element-wise prefix plus.
Declaration
static member ( ~+ ): a:Tensor<'T> -> Tensor<'T>
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor<'T> | a | The tensor to operate on. |
Returns
| Type | Description |
|---|---|
| Tensor<'T> | A new tensor containing the result of this operation. |
Remarks
Applies the unary plus operator to each element of tensor a and returns the result
as a new tensor.
For most data types, this operation does not change the value.
Examples
let a = HostTensor.ofList [5.0; 6.0; 7.0]
let c = +a // c = [5.0; 6.0; 7.0]