dpnp.tensor.arange

dpnp.tensor.arange(start, /, stop=None, step=1, *, dtype=None, device=None, usm_type='device', sycl_queue=None)[source]

Returns evenly spaced values within the half-open interval [start, stop) as a one-dimensional array.

Parameters:
  • start (scalar) -- Starting point of the interval

  • stop ({None, scalar}, optional) --

    Ending point of the interval.

    Default: None.

  • step (scalar, optional) --

    Increment of the returned sequence.

    Default: 1.

  • dtype ({None, dtype}, optional) --

    Output array data type.

    Default: None.

  • device ({None, object}, optional) --

    array API concept of device where the output array is created. device can be None, a oneAPI filter selector string, an instance of dpctl.SyclDevice corresponding to a non-partitioned SYCL device, an instance of dpctl.SyclQueue, or a dpnp.tensor.Device object returned by dpnp.tensor.usm_ndarray.device.

    Default: None.

  • usm_type ({None, "device", "shared", "host"}, optional) --

    The type of SYCL USM allocation for the output array.

    Default: "device".

  • sycl_queue ({None, dpctl.SyclQueue}, optional) --

    The SYCL queue to use for output array allocation and copying. sycl_queue and device are complementary arguments, i.e. use one or another. If both are specified, a TypeError is raised unless both imply the same underlying SYCL queue to be used. If both are None, a cached queue targeting default-selected device is used for allocation and population.

    Default: None.

Returns:

out -- Array populated with evenly spaced values.

Return type:

usm_ndarray