Python Array API#

Cubed implements the Python Array API standard in cubed.array_api. Refer to its API specification for API documentation.

Missing from Cubed#

The following parts of the standard are not implemented:

Category

Object/Function

Array object

In-place Ops

Creation Functions

from_dlpack

Indexing

Boolean array

Manipulation Functions

flip

roll

Searching Functions

nonzero

Set Functions

unique_all

unique_counts

unique_inverse

unique_values

Sorting Functions

argsort

sort

Statistical Functions

std

var

Differences between Cubed and the standard#

The following Creation Functions accept extra chunks and spec keyword arguments:

cubed.array_api.arange(start, /, stop=None, step=1, *, dtype=None, device=None, chunks='auto', spec=None)#
cubed.array_api.asarray(obj, /, *, dtype=None, device=None, copy=None, chunks='auto', spec=None)#
cubed.array_api.empty(shape, *, dtype=None, device=None, chunks='auto', spec=None)#
cubed.array_api.empty_like(x, /, *, dtype=None, device=None, chunks=None, spec=None)#
cubed.array_api.eye(n_rows, n_cols=None, /, *, k=0, dtype=None, device=None, chunks='auto', spec=None)#
cubed.array_api.full(shape, fill_value, *, dtype=None, device=None, chunks='auto', spec=None)#
cubed.array_api.full_like(x, /, fill_value, *, dtype=None, device=None, chunks=None, spec=None)#
cubed.array_api.linspace(start, stop, /, num, *, dtype=None, device=None, endpoint=True, chunks='auto', spec=None)#
cubed.array_api.ones(shape, *, dtype=None, device=None, chunks='auto', spec=None)#
cubed.array_api.ones_like(x, /, *, dtype=None, device=None, chunks=None, spec=None)#
cubed.array_api.zeros(shape, *, dtype=None, device=None, chunks='auto', spec=None)#
cubed.array_api.zeros_like(x, /, *, dtype=None, device=None, chunks=None, spec=None)#

The following Manipulation Functions accept extra chunks keyword arguments:

cubed.array_api.broadcast_to(x, /, shape, *, chunks=None)#