ivy.linspace(start: ivy.NativeArray, stop: ivy.NativeArray, num: int, axis: Optional[int] = None, dev_str: Optional[str] = None, f: Optional[ivy.Framework] = None) → ivy.NativeArray[source]

Generates a certain number of evenly-spaced values in an interval along a given axis.

See \(arange\) that allows to specify the step size of evenly spaced values in an interval.

  • start (array) – First entry in the range.

  • stop (array) – Final entry in the range.

  • num (int) – Number of values to generate.

  • axis (int) – Axis along which the operation is performed.

  • dev_str (str) – device on which to create the array ‘cuda:0’, ‘cuda:1’, ‘cpu’ etc.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


Tensor of evenly-spaced values.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty