dask 2021.10.0

ParametersReturnsBackRef
repeat(a, repeats, axis=None)

This docstring was copied from numpy.repeat.

Some inconsistencies with the Dask version may exist.

Parameters

a : array_like

Input array.

repeats : int or array of ints

The number of repetitions for each element. :None:None:`repeats` is broadcasted to fit the shape of the given axis.

axis : int, optional

The axis along which to repeat values. By default, use the flattened input array, and return a flat output array.

Returns

repeated_array : ndarray

Output array which has the same shape as a, except along the given axis.

Repeat elements of an array.

See Also

tile

Tile an array.

unique

Find the unique elements of an array.

Examples

This example is valid syntax, but we were not able to check execution
>>> np.repeat(3, 4)  # doctest: +SKIP
array([3, 3, 3, 3])
This example is valid syntax, but we were not able to check execution
>>> x = np.array([[1,2],[3,4]])  # doctest: +SKIP
... np.repeat(x, 2) # doctest: +SKIP array([1, 1, 2, 2, 3, 3, 4, 4])
This example is valid syntax, but we were not able to check execution
>>> np.repeat(x, 3, axis=1)  # doctest: +SKIP
array([[1, 1, 1, 2, 2, 2],
       [3, 3, 3, 4, 4, 4]])
This example is valid syntax, but we were not able to check execution
>>> np.repeat(x, [1, 2], axis=0)  # doctest: +SKIP
array([[1, 2],
       [3, 4],
       [3, 4]])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.array.creation.tile

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/creation.py#724
type: <class 'function'>
Commit: