dask 2021.10.0

ParametersReturnsBackRef
dstack(tup, allow_unknown_chunksizes=False)

This docstring was copied from numpy.dstack.

Some inconsistencies with the Dask version may exist.

This is equivalent to concatenation along the third axis after 2-D arrays of shape :None:None:`(M,N)` have been reshaped to :None:None:`(M,N,1)` and 1-D arrays of shape :None:None:`(N,)` have been reshaped to :None:None:`(1,N,1)`. Rebuilds arrays divided by :None:None:`dsplit`.

This function makes most sense for arrays with up to 3 dimensions. For instance, for pixel-data with a height (first axis), width (second axis), and r/g/b channels (third axis). The functions :None:None:`concatenate`, stack and block provide more general stacking and concatenation operations.

Parameters

tup : sequence of arrays

The arrays must have the same shape along all but the third axis. 1-D or 2-D arrays must have the same shape.

Returns

stacked : ndarray

The array formed by stacking the given arrays, will be at least 3-D.

Stack arrays in sequence depth wise (along third axis).

See Also

block

Assemble an nd-array from nested lists of blocks.

column_stack

Stack 1-D arrays as columns into a 2-D array.

concatenate

Join a sequence of arrays along an existing axis.

dsplit

Split array along third axis.

hstack

Stack arrays in sequence horizontally (column wise).

stack

Join a sequence of arrays along a new axis.

vstack

Stack arrays in sequence vertically (row wise).

Examples

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

Back References

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

dask.utils.concatenate dask.array.core.block dask.array.routines.hstack dask.array.routines.vstack

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/routines.py#144
type: <class 'function'>
Commit: