MCPcopy Index your code
hub / github.com/dask/dask / arange

Function arange

dask/array/_array_expr/_creation.py:200–240  ·  view source on GitHub ↗

Return evenly spaced values from `start` to `stop` with step size `step`. The values are half-open [start, stop), so including start and excluding stop. This is basically the same as python's range function but for dask arrays. When using a non-integer step, such as 0.1, the r

(start=0, stop=None, step=1, *, chunks="auto", like=None, dtype=None)

Source from the content-addressed store, hash-verified

198
199
200def arange(start=0, stop=None, step=1, *, chunks="auto", like=None, dtype=None):
201 """
202 Return evenly spaced values from `start` to `stop` with step size `step`.
203
204 The values are half-open [start, stop), so including start and excluding
205 stop. This is basically the same as python's range function but for dask
206 arrays.
207
208 When using a non-integer step, such as 0.1, the results will often not be
209 consistent. It is better to use linspace for these cases.
210
211 Parameters
212 ----------
213 start : int, optional
214 The starting value of the sequence. The default is 0.
215 stop : int
216 The end of the interval, this value is excluded from the interval.
217 step : int, optional
218 The spacing between the values. The default is 1 when not specified.
219 chunks : int
220 The number of samples on each block. Note that the last block will have
221 fewer samples if ``len(array) % chunks != 0``.
222 Defaults to "auto" which will automatically determine chunk sizes.
223 dtype : numpy.dtype
224 Output dtype. Omit to infer it from start, stop, step
225 Defaults to ``None``.
226 like : array type or ``None``
227 Array to extract meta from. Defaults to ``None``.
228
229 Returns
230 -------
231 samples : dask array
232
233 See Also
234 --------
235 dask.array.linspace
236 """
237 if stop is None:
238 stop = start
239 start = 0
240 return new_collection(Arange(start, stop, step, chunks, like, dtype))
241
242
243def linspace(

Callers 2

permutationMethod · 0.90
permutationMethod · 0.90

Calls 2

new_collectionFunction · 0.90
ArangeClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…