Method scalarLike
static member scalarLike: ITensor -> 'T -> Tensor<'T>
Creates a new zero-dimensional (scalar) tensor using the specified tensor as template and with the specified value.
Declaration
static member scalarLike: tmpl:ITensor -> value:'T -> Tensor<'T>
Parameters
Type | Name | Description |
---|---|---|
ITensor | tmpl | The template tensor. |
'T | value | The value of the new, scalar tensor. |
Returns
Type | Description |
---|---|
Tensor<'T> | The new tensor. |
Remarks
A new tensor of zero-dimensional shape is created on the same device as tmpl
.
The values of the tensor is set to the specified value.