store(sources: 'Array | Collection[Array]', targets, lock: 'bool | Lock' = True, regions: 'tuple[slice, ...] | Collection[tuple[slice, ...]] | None' = None, compute: 'bool' = True, return_stored: 'bool' = False, **kwargs)
This stores dask arrays into object that supports numpy-style setitem indexing. It stores values chunk by chunk so that it does not have to fill up memory. For best performance you can align the block size of the storage target with the block size of your array.
If your data fits in memory then you may prefer calling np.array(myarray)
instead.
These should support setitem syntax target[10:20] = ...
Whether or not to lock the data stores while storing. Pass True (lock each file individually), False (don't lock) or a particular threading.Lock
object to be shared among all writes.
Each region
tuple in regions
should be such that target[region].shape = source.shape
for the corresponding source and target in sources and targets, respectively. If this is a tuple, the contents will be assumed to be slices, so do not provide a tuple of tuples.
If true compute immediately; return dask.delayed.Delayed
otherwise.
Optionally return the stored result (default False).
Parameters passed to compute/persist (only used if compute=True)
tuple of Arrays
None
Delayed
Store dask arrays in array-like objects, overwrite data in target
>>> import h5py # doctest: +SKIPThis example is valid syntax, but we were not able to check execution
... f = h5py.File('myfile.hdf5', mode='a') # doctest: +SKIP
... dset = f.create_dataset('/data', shape=x.shape,
... chunks=x.chunks,
... dtype='f8') # doctest: +SKIP
>>> store(x, dset) # doctest: +SKIP
Alternatively store many arrays at the same time
This example is valid syntax, but we were not able to check execution>>> store([x, y, z], [dset1, dset2, dset3]) # doctest: +SKIPSee :
The following pages refer to to this document either explicitly or contain code examples using this.
dask.array.core.store
dask.array.core.to_zarr
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