Method trues
static member trues: ITensorDevice -> int64 list -> Tensor<bool>
Creates a new boolean tensor filled with trues.
Declaration
static member trues: dev:ITensorDevice -> shape:int64 list -> Tensor<bool>
Parameters
Type | Name | Description |
---|---|---|
ITensorDevice | dev | The device to create the tensor on. |
int64 list | shape | The shape of the new tensor. |
Returns
Type | Description |
---|---|
Tensor<bool> | The new tensor. |
Remarks
A new tensor of the specified shape is created on the specified device.
The tensor is filled with trues.
Examples
let a = Tensor.trues HostTensor.Dev [2L; 3L]
// a = [[true; true; true]
// [true; true; true]]