API Reference#

Array#

A Cubed array can be created by from_array(), from_zarr(), or by one of the Python Array API Creation Functions.

Array

Chunked array backed by Zarr storage that conforms to the Python Array API standard.

Array.compute

Compute this array, and any arrays that it depends on.

Array.rechunk

Change the chunking of this array without changing its shape or data.

Array.visualize

Produce a visualization of the computation graph for this array.

compute

Compute multiple arrays at once.

visualize

Produce a visualization of the computation graph for multiple arrays.

IO#

from_array

Create a Cubed array from an array-like object.

from_zarr

Load an array from Zarr storage.

store

Save source arrays to array-like objects.

to_zarr

Save an array to Zarr storage.

Chunk-specific functions#

apply_gufunc

Apply a generalized ufunc or similar python function to arrays.

map_blocks

Apply a function to corresponding blocks from multiple input arrays.

map_overlap

Apply a function to corresponding blocks from multiple input arrays with some overlap.

Non-standardised functions#

nanmean

Compute the arithmetic mean along the specified axis, ignoring NaNs.

nansum

Return the sum of array elements over a given axis treating NaNs as zero.

pad

Pad an array.

Random number generation#

random

Return random floats in the half-open interval [0.0, 1.0).

Runtime#

Callback

Object to receive callback events during array computation.

Spec

Specification of resources available to run a computation.

TaskEndEvent

Callback information about a completed task (or tasks).

measure_reserved_mem

Measures the reserved memory use for a given executor runtime.

Executors#

local.SingleThreadedExecutor

The default execution engine that runs tasks sequentially uses Python loops.

local.ThreadsExecutor

An execution engine that uses Python asyncio.

local.ProcessesExecutor

An execution engine that uses local processes.

beam.BeamExecutor

An execution engine that uses Apache Beam.

lithops.LithopsExecutor

An execution engine that uses Lithops.

modal.ModalExecutor

An execution engine that uses Modal's async API.