diff --git a/spec/draft/API_specification/array_object.rst b/spec/draft/API_specification/array_object.rst index f8a586ade..a3694d14c 100644 --- a/spec/draft/API_specification/array_object.rst +++ b/spec/draft/API_specification/array_object.rst @@ -30,47 +30,47 @@ Arithmetic Operators A conforming implementation of the array API standard must provide and support an array object supporting the following Python arithmetic operators. -- ``+x``: :meth:`.array.__pos__` +- ``+x``: :meth:`.Array.__pos__` - `operator.pos(x) `_ - `operator.__pos__(x) `_ -- `-x`: :meth:`.array.__neg__` +- `-x`: :meth:`.Array.__neg__` - `operator.neg(x) `_ - `operator.__neg__(x) `_ -- `x1 + x2`: :meth:`.array.__add__` +- `x1 + x2`: :meth:`.Array.__add__` - `operator.add(x1, x2) `_ - `operator.__add__(x1, x2) `_ -- `x1 - x2`: :meth:`.array.__sub__` +- `x1 - x2`: :meth:`.Array.__sub__` - `operator.sub(x1, x2) `_ - `operator.__sub__(x1, x2) `_ -- `x1 * x2`: :meth:`.array.__mul__` +- `x1 * x2`: :meth:`.Array.__mul__` - `operator.mul(x1, x2) `_ - `operator.__mul__(x1, x2) `_ -- `x1 / x2`: :meth:`.array.__truediv__` +- `x1 / x2`: :meth:`.Array.__truediv__` - `operator.truediv(x1,x2) `_ - `operator.__truediv__(x1, x2) `_ -- `x1 // x2`: :meth:`.array.__floordiv__` +- `x1 // x2`: :meth:`.Array.__floordiv__` - `operator.floordiv(x1, x2) `_ - `operator.__floordiv__(x1, x2) `_ -- `x1 % x2`: :meth:`.array.__mod__` +- `x1 % x2`: :meth:`.Array.__mod__` - `operator.mod(x1, x2) `_ - `operator.__mod__(x1, x2) `_ -- `x1 ** x2`: :meth:`.array.__pow__` +- `x1 ** x2`: :meth:`.Array.__pow__` - `operator.pow(x1, x2) `_ - `operator.__pow__(x1, x2) `_ @@ -82,7 +82,7 @@ Array Operators A conforming implementation of the array API standard must provide and support an array object supporting the following Python array operators. -- `x1 @ x2`: :meth:`.array.__matmul__` +- `x1 @ x2`: :meth:`.Array.__matmul__` - `operator.matmul(x1, x2) `_ - `operator.__matmul__(x1, x2) `_ @@ -94,34 +94,34 @@ Bitwise Operators A conforming implementation of the array API standard must provide and support an array object supporting the following Python bitwise operators. -- `~x`: :meth:`.array.__invert__` +- `~x`: :meth:`.Array.__invert__` - `operator.inv(x) `_ - `operator.invert(x) `_ - `operator.__inv__(x) `_ - `operator.__invert__(x) `_ -- `x1 & x2`: :meth:`.array.__and__` +- `x1 & x2`: :meth:`.Array.__and__` - `operator.and(x1, x2) `_ - `operator.__and__(x1, x2) `_ -- `x1 | x2`: :meth:`.array.__or__` +- `x1 | x2`: :meth:`.Array.__or__` - `operator.or(x1, x2) `_ - `operator.__or__(x1, x2) `_ -- `x1 ^ x2`: :meth:`.array.__xor__` +- `x1 ^ x2`: :meth:`.Array.__xor__` - `operator.xor(x1, x2) `_ - `operator.__xor__(x1, x2) `_ -- `x1 << x2`: :meth:`.array.__lshift__` +- `x1 << x2`: :meth:`.Array.__lshift__` - `operator.lshift(x1, x2) `_ - `operator.__lshift__(x1, x2) `_ -- `x1 >> x2`: :meth:`.array.__rshift__` +- `x1 >> x2`: :meth:`.Array.__rshift__` - `operator.rshift(x1, x2) `_ - `operator.__rshift__(x1, x2) `_ @@ -133,37 +133,37 @@ Comparison Operators A conforming implementation of the array API standard must provide and support an array object supporting the following Python comparison operators. -- `x1 < x2`: :meth:`.array.__lt__` +- `x1 < x2`: :meth:`.Array.__lt__` - `operator.lt(x1, x2) `_ - `operator.__lt__(x1, x2) `_ -- `x1 <= x2`: :meth:`.array.__le__` +- `x1 <= x2`: :meth:`.Array.__le__` - `operator.le(x1, x2) `_ - `operator.__le__(x1, x2) `_ -- `x1 > x2`: :meth:`.array.__gt__` +- `x1 > x2`: :meth:`.Array.__gt__` - `operator.gt(x1, x2) `_ - `operator.__gt__(x1, x2) `_ -- `x1 >= x2`: :meth:`.array.__ge__` +- `x1 >= x2`: :meth:`.Array.__ge__` - `operator.ge(x1, x2) `_ - `operator.__ge__(x1, x2) `_ -- `x1 == x2`: :meth:`.array.__eq__` +- `x1 == x2`: :meth:`.Array.__eq__` - `operator.eq(x1, x2) `_ - `operator.__eq__(x1, x2) `_ -- `x1 != x2`: :meth:`.array.__ne__` +- `x1 != x2`: :meth:`.Array.__ne__` - `operator.ne(x1, x2) `_ - `operator.__ne__(x1, x2) `_ -:meth:`.array.__lt__`, :meth:`.array.__le__`, :meth:`.array.__gt__`, :meth:`.array.__ge__` are only defined for arrays having real-valued data types. Other comparison operators should be defined for arrays having any data type. +:meth:`.Array.__lt__`, :meth:`.Array.__le__`, :meth:`.Array.__gt__`, :meth:`.Array.__ge__` are only defined for arrays having real-valued data types. Other comparison operators should be defined for arrays having any data type. For backward compatibility, conforming implementations may support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent (see :ref:`complex-number-ordering`). In-place Operators @@ -272,37 +272,37 @@ Methods :toctree: generated :template: property.rst - array.__abs__ - array.__add__ - array.__and__ - array.__array_namespace__ - array.__bool__ - array.__complex__ - array.__dlpack__ - array.__dlpack_device__ - array.__eq__ - array.__float__ - array.__floordiv__ - array.__ge__ - array.__getitem__ - array.__gt__ - array.__index__ - array.__int__ - array.__invert__ - array.__le__ - array.__lshift__ - array.__lt__ - array.__matmul__ - array.__mod__ - array.__mul__ - array.__ne__ - array.__neg__ - array.__or__ - array.__pos__ - array.__pow__ - array.__rshift__ - array.__setitem__ - array.__sub__ - array.__truediv__ - array.__xor__ - array.to_device + Array.__abs__ + Array.__add__ + Array.__and__ + Array.__Array_namespace__ + Array.__bool__ + Array.__complex__ + Array.__dlpack__ + Array.__dlpack_device__ + Array.__eq__ + Array.__float__ + Array.__floordiv__ + Array.__ge__ + Array.__getitem__ + Array.__gt__ + Array.__index__ + Array.__int__ + Array.__invert__ + Array.__le__ + Array.__lshift__ + Array.__lt__ + Array.__matmul__ + Array.__mod__ + Array.__mul__ + Array.__ne__ + Array.__neg__ + Array.__or__ + Array.__pos__ + Array.__pow__ + Array.__rshift__ + Array.__setitem__ + Array.__sub__ + Array.__truediv__ + Array.__xor__ + Array.to_device