public static linspace(start as Double, stop as Double, count as Long = 50, endpoint as Boolean = true) as NDArray<T>
Creates evenly spaced samples, including both endpoints by default. Integer specializations convert each sample to T after interpolation.
| Parameter | Description |
|---|---|
start | First sample. |
stop | Last sample when endpoint is true; otherwise the excluded bound. |
count | Positive number of samples. A single sample equals start. |
endpoint | Whether to include stop. |
A new one-dimensional array of samples.
x = NDArray<Double>.linspace(-Math.PI, Math.PI, 1000) y = x.sin()