arange
Return evenly spaced values within a given interval. When called with a single argument, it is treated asstop and start defaults to 0.
| Name | Type | Default | Description |
|---|---|---|---|
start | number | 0 | Start of the interval (inclusive). If stop is omitted, this value is used as stop and start becomes 0. |
stop | number | - | End of the interval (exclusive). |
step | number | 1 | Spacing between values. |
dtype | DType | 'float64' | Data type of the output array. |
NDArray — 1-D array of evenly spaced values.
linspace
Return evenly spaced numbers over a specified interval. Unlikearange, the stop value is included by default.
| Name | Type | Default | Description |
|---|---|---|---|
start | number | - | Start value of the sequence. |
stop | number | - | End value of the sequence (inclusive). |
num | number | 50 | Number of samples to generate. |
dtype | DType | 'float64' | Data type of the output array. |
NDArray — 1-D array of num evenly spaced values from start to stop.
logspace
Return numbers spaced evenly on a log scale. In the default base 10,start and stop are exponents: the sequence runs from base**start to base**stop.
| Name | Type | Default | Description |
|---|---|---|---|
start | number | - | base**start is the starting value of the sequence. |
stop | number | - | base**stop is the final value of the sequence. |
num | number | 50 | Number of samples to generate. |
base | number | 10.0 | The base of the log space. |
dtype | DType | 'float64' | Data type of the output array. |
NDArray — 1-D array of num samples, equally spaced on a log scale.
geomspace
Return numbers spaced evenly on a log scale (a geometric sequence). Unlikelogspace, start and stop are the actual start/stop values, not exponents.
| Name | Type | Default | Description |
|---|---|---|---|
start | number | - | The starting value of the sequence. Must be non-zero. |
stop | number | - | The final value of the sequence. Must be non-zero and same sign as start. |
num | number | 50 | Number of samples to generate. |
dtype | DType | 'float64' | Data type of the output array. |
NDArray — 1-D array of num samples, equally spaced on a geometric (log) scale.
Throws: Error if start or stop is zero, or if they have different signs.