pub fn ones(
shape: impl Shape,
dtype: impl AsDType,
device: impl AsDevice
) -> Tensor
Expand description
Creates a Tensor filled with ones.
§Arguments
shape - The shape of the Tensor.
dtype - The data type of the Tensor.
device - The device to place the Tensor on.
§Returns
A Tensor filled with ones.