tile(A, reps)
This docstring was copied from numpy.tile.
Some inconsistencies with the Dask version may exist.
If :None:None:`reps`
has length d
, the result will have dimension of max(d, A.ndim)
.
If A.ndim < d
, A
is promoted to be d-dimensional by prepending new axes. So a shape (3,) array is promoted to (1, 3) for 2-D replication, or shape (1, 1, 3) for 3-D replication. If this is not the desired behavior, promote A
to d-dimensions manually before calling this function.
If A.ndim > d
, :None:None:`reps`
is promoted to A
.ndim by pre-pending 1's to it. Thus for an A
of shape (2, 3, 4, 5), a :None:None:`reps`
of (2, 2) is treated as (1, 1, 2, 2).
The tiled output array.
Construct an array by repeating A the number of times given by reps.
broadcast_to
Broadcast an array to a new shape
repeat
Repeat elements of an array.
>>> a = np.array([0, 1, 2]) # doctest: +SKIPThis example is valid syntax, but we were not able to check execution
... np.tile(a, 2) # doctest: +SKIP array([0, 1, 2, 0, 1, 2])
>>> np.tile(a, (2, 2)) # doctest: +SKIP array([[0, 1, 2, 0, 1, 2], [0, 1, 2, 0, 1, 2]])This example is valid syntax, but we were not able to check execution
>>> np.tile(a, (2, 1, 2)) # doctest: +SKIP array([[[0, 1, 2, 0, 1, 2]], [[0, 1, 2, 0, 1, 2]]])This example is valid syntax, but we were not able to check execution
>>> b = np.array([[1, 2], [3, 4]]) # doctest: +SKIPThis example is valid syntax, but we were not able to check execution
... np.tile(b, 2) # doctest: +SKIP array([[1, 2, 1, 2], [3, 4, 3, 4]])
>>> np.tile(b, (2, 1)) # doctest: +SKIP array([[1, 2], [3, 4], [1, 2], [3, 4]])This example is valid syntax, but we were not able to check execution
>>> c = np.array([1,2,3,4]) # doctest: +SKIPSee :
... np.tile(c,(4,1)) # doctest: +SKIP array([[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]])
The following pages refer to to this document either explicitly or contain code examples using this.
dask.array.creation.repeat
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