cupy.array_api._array_object.Array#

class cupy.array_api._array_object.Array(*args, **kwargs)[source]#

n-d array object for the array API namespace.

See the docstring of np.ndarray for more information.

This is a wrapper around numpy.ndarray that restricts the usage to only those things that are required by the array API namespace. Note, attributes on this object that start with a single underscore are not part of the API specification and should only be used internally. This object should not be constructed directly. Rather, use one of the creation functions, such as asarray().

Methods

__getitem__(key, /)[source]#

Performs the operation __getitem__.

Return type:

Array

__setitem__(key, value, /)[source]#

Performs the operation __setitem__.

to_device(device, /, stream=None)[source]#
Return type:

Array

__eq__(other, /)[source]#

Performs the operation __eq__.

Return type:

Array

__ne__(other, /)[source]#

Performs the operation __ne__.

Return type:

Array

__lt__(other, /)[source]#

Performs the operation __lt__.

Return type:

Array

__le__(other, /)[source]#

Performs the operation __le__.

Return type:

Array

__gt__(other, /)[source]#

Performs the operation __gt__.

Return type:

Array

__ge__(other, /)[source]#

Performs the operation __ge__.

Return type:

Array

__bool__()[source]#

Performs the operation __bool__.

Return type:

bool

Attributes

T#

Array API compatible wrapper for np.ndarray.T.

See its docstring for more information.

device#
dtype#

Array API compatible wrapper for np.ndarray.dtype.

See its docstring for more information.

mT#
ndim#

Array API compatible wrapper for np.ndarray.ndim.

See its docstring for more information.

shape#

Array API compatible wrapper for np.ndarray.shape.

See its docstring for more information.

size#

Array API compatible wrapper for np.ndarray.size.

See its docstring for more information.