Function arange

  • Create a Tensor of evenly-spaced values in a given interval.

    Example

      // create a tensor of even values starting with 0: `[0,2,4,8]`
    const t = sm.arange(0, 10, 2)

    Returns

    A new 1D Tensor containing the user defined interval.

    Parameters

    • start: number

      The start of the interval (inclusive)

    • end: number

      The end of the interval (exclusive)

    • step: number = 1

      An optional argument to stride the interval

    Returns Tensor

Generated using TypeDoc