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__.

Parameters:
Return type:

Array

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

Performs the operation __setitem__.

Parameters:
Return type:

None

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

Array

__eq__(other, /)[source]#

Performs the operation __eq__.

Parameters:
Return type:

Array

__ne__(other, /)[source]#

Performs the operation __ne__.

Parameters:
Return type:

Array

__lt__(other, /)[source]#

Performs the operation __lt__.

Parameters:
Return type:

Array

__le__(other, /)[source]#

Performs the operation __le__.

Parameters:
Return type:

Array

__gt__(other, /)[source]#

Performs the operation __gt__.

Parameters:
Return type:

Array

__ge__(other, /)[source]#

Performs the operation __ge__.

Parameters:
Return type:

Array

__bool__()[source]#

Performs the operation __bool__.

Parameters:

self (Array) –

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.