Function arange

Source
pub fn arange<D: Type, T: ArangeArgs<D>>(
    args: T,
    device: impl AsDevice,
) -> Tensor
Expand description

Creates a 1-D Tensor with values from a range.

§Arguments

  • args - The arguments for the arange function.
  • device - The device to place the Tensor on.

§Returns

A 1-D Tensor with values from the specified range.