stack(seq, axis=0, allow_unknown_chunksizes=False)
Given a sequence of dask arrays, form a new dask array by stacking them along a new dimension (axis=0 by default)
Dimension along which to align all of the arrays
Allow unknown chunksizes, such as come from converting from dask dataframes. Dask.array is unable to verify that chunks line up. If data comes from differently aligned sources then this can cause unexpected results.
Stack arrays along a new axis
Create slices
This example is valid syntax, but we were not able to check execution>>> import dask.array as daThis example is valid syntax, but we were not able to check execution
... import numpy as np
>>> data = [da.from_array(np.ones((4, 4)), chunks=(2, 2))This example is valid syntax, but we were not able to check execution
... for i in range(3)]
>>> x = da.stack(data, axis=0)This example is valid syntax, but we were not able to check execution
... x.shape (3, 4, 4)
>>> da.stack(data, axis=1).shape (4, 3, 4)This example is valid syntax, but we were not able to check execution
>>> da.stack(data, axis=-1).shape (4, 4, 3)
Result is a new dask Array
See :The following pages refer to to this document either explicitly or contain code examples using this.
dask.array.core.stack
dask.utils.concatenate
dask.array.core.concatenate
dask.array.routines.dstack
dask.array.routines.hstack
dask.array.core.block
dask.array.routines.vstack
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