cupy.linspace¶
-
cupy.
linspace
(start, stop, num=50, endpoint=True, retstep=False, dtype=None)[source]¶ Returns an array with evenly-spaced values within a given interval.
Instead of specifying the step width like
cupy.arange()
, this function requires the total number of elements specified.Parameters: - start – Start of the interval.
- stop – End of the interval.
- num – Number of elements.
- endpoint (bool) – If
True
, the stop value is included as the last element. Otherwise, the stop value is omitted. - retstep (bool) – If
True
, this function returns (array, step). Otherwise, it returns only the array. - dtype – Data type specifier. It is inferred from the start and stop arguments by default.
Returns: The 1-D array of ranged values.
Return type: