dask.array.Array
dask.array.Array¶
- class dask.array.Array(dask, name, chunks, dtype=None, meta=None, shape=None)[source]¶
Parallel Dask Array
A parallel nd-array comprised of many numpy arrays arranged in a grid.
This constructor is for advanced uses only. For normal use see the
dask.array.from_array()
function.- Parameters
- daskdict
Task dependency graph
- namestring
Name of array in dask
- shapetuple of ints
Shape of the entire array
- chunks: iterable of tuples
block sizes along each dimension
- dtypestr or dtype
Typecode or data-type for the new Dask Array
- metaempty ndarray
empty ndarray created with same NumPy backend, ndim and dtype as the Dask Array being created (overrides dtype)
See also
- __init__(*args, **kwargs)¶
Methods
__init__
(*args, **kwargs)all
([axis, keepdims, split_every, out])Returns True if all elements evaluate to True.
any
([axis, keepdims, split_every, out])Returns True if any of the elements evaluate to True.
argmax
([axis, keepdims, split_every, out])Return indices of the maximum values along the given axis.
argmin
([axis, keepdims, split_every, out])Return indices of the minimum values along the given axis.
argtopk
(k[, axis, split_every])The indices of the top k elements of an array.
astype
(dtype, **kwargs)Copy of the array, cast to a specified type.
choose
(choices)Use an index array to construct a new array from a set of choices.
clip
([min, max])Return an array whose values are limited to
[min, max]
.compute
(**kwargs)Compute this dask collection
Compute the chunk sizes for a Dask array.
conj
()Complex-conjugate all elements.
copy
()Copy array.
cumprod
(axis[, dtype, out, method])Return the cumulative product of the elements along the given axis.
cumsum
(axis[, dtype, out, method])Return the cumulative sum of the elements along the given axis.
dot
(other)Dot product of self and other.
flatten
()Return a flattened array.
map_blocks
(*args[, name, token, dtype, ...])Map a function across all blocks of a dask array.
map_overlap
(func, depth[, boundary, trim])Map a function over blocks of the array with some overlap
max
([axis, keepdims, split_every, out])Return the maximum along a given axis.
mean
([axis, dtype, keepdims, split_every, out])Returns the average of the array elements along given axis.
min
([axis, keepdims, split_every, out])Return the minimum along a given axis.
moment
(order[, axis, dtype, keepdims, ddof, ...])Calculate the nth centralized moment.
nonzero
()Return the indices of the elements that are non-zero.
persist
(**kwargs)Persist this dask collection into memory
prod
([axis, dtype, keepdims, split_every, out])Return the product of the array elements over the given axis
ravel
()Return a flattened array.
rechunk
([chunks, threshold, ...])Convert blocks in dask array x for new chunks.
repeat
(repeats[, axis])Repeat elements of an array.
reshape
(*shape[, merge_chunks, limit])Reshape array to new shape
round
([decimals])Return array with each element rounded to the given number of decimals.
shuffle
(indexer, axis[, chunks])Reorders one dimensions of a Dask Array based on an indexer.
squeeze
([axis])Remove axes of length one from array.
std
([axis, dtype, keepdims, ddof, ...])Returns the standard deviation of the array elements along given axis.
store
(targets[, lock, regions, compute, ...])Store dask arrays in array-like objects, overwrite data in target
sum
([axis, dtype, keepdims, split_every, out])Return the sum of the array elements over the given axis.
swapaxes
(axis1, axis2)Return a view of the array with
axis1
andaxis2
interchanged.to_backend
([backend])Move to a new Array backend
to_dask_dataframe
([columns, index, meta])Convert dask Array to dask Dataframe
to_delayed
([optimize_graph])Convert into an array of
dask.delayed.Delayed
objects, one per chunk.to_hdf5
(filename, datapath, **kwargs)Store array in HDF5 file
to_svg
([size])Convert chunks from Dask Array into an SVG Image
to_tiledb
(uri, *args, **kwargs)Save array to the TileDB storage manager
to_zarr
(*args, **kwargs)Save array to the zarr storage format
topk
(k[, axis, split_every])The top k elements of an array.
trace
([offset, axis1, axis2, dtype])Return the sum along diagonals of the array.
transpose
(*axes)Reverse or permute the axes of an array.
var
([axis, dtype, keepdims, ddof, ...])Returns the variance of the array elements, along given axis.
view
([dtype, order])Get a view of the array as a new data type
visualize
([filename, format, optimize_graph])Render the computation of this object's task graph using graphviz.
Attributes
A
T
An array-like interface to the blocks of an array.
Chunks property.
Length of one array element in bytes
Number of bytes in array
Slice an array by partitions.
Number of elements in array
Vectorized indexing with broadcasting.