Return `num` evenly spaced values over the closed interval [`start`, `stop`]. Parameters ---------- start : scalar The starting value of the sequence. stop : scalar The last value of the sequence. num : int, optional Number of samples to include
(
start, stop, num=50, endpoint=True, retstep=False, chunks="auto", dtype=None
)
| 241 | |
| 242 | |
| 243 | def linspace( |
| 244 | start, stop, num=50, endpoint=True, retstep=False, chunks="auto", dtype=None |
| 245 | ): |
| 246 | """ |
| 247 | Return `num` evenly spaced values over the closed interval [`start`, |
| 248 | `stop`]. |
| 249 | |
| 250 | Parameters |
| 251 | ---------- |
| 252 | start : scalar |
| 253 | The starting value of the sequence. |
| 254 | stop : scalar |
| 255 | The last value of the sequence. |
| 256 | num : int, optional |
| 257 | Number of samples to include in the returned dask array, including the |
| 258 | endpoints. Default is 50. |
| 259 | endpoint : bool, optional |
| 260 | If True, ``stop`` is the last sample. Otherwise, it is not included. |
| 261 | Default is True. |
| 262 | retstep : bool, optional |
| 263 | If True, return (samples, step), where step is the spacing between |
| 264 | samples. Default is False. |
| 265 | chunks : int |
| 266 | The number of samples on each block. Note that the last block will have |
| 267 | fewer samples if `num % blocksize != 0` |
| 268 | dtype : dtype, optional |
| 269 | The type of the output array. |
| 270 | |
| 271 | Returns |
| 272 | ------- |
| 273 | samples : dask array |
| 274 | step : float, optional |
| 275 | Only returned if ``retstep`` is True. Size of spacing between samples. |
| 276 | |
| 277 | See Also |
| 278 | -------- |
| 279 | dask.array.arange |
| 280 | """ |
| 281 | num = int(num) |
| 282 | result = new_collection(Linspace(start, stop, num, endpoint, chunks, dtype)) |
| 283 | if retstep: |
| 284 | return result, result.expr.step |
| 285 | else: |
| 286 | return result |
| 287 | |
| 288 | |
| 289 | def empty_like(a, dtype=None, order="C", chunks=None, name=None, shape=None): |
nothing calls this directly
no test coverage detected