Skip to content

PR: Transform linear algebra functions extension md to rst #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions spec/API_specification/signatures/array_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def __abs__(self: array, /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.abs`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.abs`.
"""

def __add__(self: array, other: Union[int, float, array], /) -> array:
Expand Down Expand Up @@ -179,7 +179,7 @@ def __add__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.add`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.add`.
"""

def __and__(self: array, other: Union[int, bool, array], /) -> array:
Expand All @@ -200,7 +200,7 @@ def __and__(self: array, other: Union[int, bool, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.bitwise_and`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.bitwise_and`.
"""

def __array_namespace__(self: array, /, *, api_version: Optional[str] = None) -> Any:
Expand Down Expand Up @@ -237,7 +237,7 @@ def __bool__(self: array, /) -> bool:

def __dlpack__(self: array, /, *, stream: Optional[Union[int, Any]] = None) -> PyCapsule:
"""
Exports the array for consumption by :func:`signatures.creation_functions.from_dlpack` as a DLPack capsule.
Exports the array for consumption by :func:`~signatures.creation_functions.from_dlpack` as a DLPack capsule.

Parameters
----------
Expand Down Expand Up @@ -292,7 +292,7 @@ def __dlpack__(self: array, /, *, stream: Optional[Union[int, Any]] = None) -> P

def __dlpack_device__(self: array, /) -> Tuple[Enum, int]:
"""
Returns device type and device ID in DLPack format. Meant for use within :func:`signatures.creation_functions.from_dlpack`.
Returns device type and device ID in DLPack format. Meant for use within :func:`~signatures.creation_functions.from_dlpack`.

Parameters
----------
Expand Down Expand Up @@ -334,7 +334,7 @@ def __eq__(self: array, other: Union[int, float, bool, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.equal`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.equal`.
"""

def __float__(self: array, /) -> float:
Expand Down Expand Up @@ -409,7 +409,7 @@ def __floordiv__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.floor_divide`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.floor_divide`.
"""

def __ge__(self: array, other: Union[int, float, array], /) -> array:
Expand All @@ -430,7 +430,7 @@ def __ge__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.greater_equal`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.greater_equal`.
"""

def __getitem__(self: array, key: Union[int, slice, ellipsis, Tuple[Union[int, slice, ellipsis], ...], array], /) -> array:
Expand Down Expand Up @@ -468,7 +468,7 @@ def __gt__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.greater`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.greater`.
"""

def __index__(self: array, /) -> int:
Expand Down Expand Up @@ -520,7 +520,7 @@ def __invert__(self: array, /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.bitwise_invert`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.bitwise_invert`.
"""

def __le__(self: array, other: Union[int, float, array], /) -> array:
Expand All @@ -541,7 +541,7 @@ def __le__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.less_equal`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.less_equal`.
"""

def __lshift__(self: array, other: Union[int, array], /) -> array:
Expand All @@ -562,7 +562,7 @@ def __lshift__(self: array, other: Union[int, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.bitwise_left_shift`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.bitwise_left_shift`.
"""

def __lt__(self: array, other: Union[int, float, array], /) -> array:
Expand All @@ -583,7 +583,7 @@ def __lt__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.less`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.less`.
"""

def __matmul__(self: array, other: array, /) -> array:
Expand Down Expand Up @@ -614,7 +614,7 @@ def __matmul__(self: array, other: array, /) -> array:


.. note::
Results must equal the results returned by the equivalent function :func:`signatures.linear_algebra_functions.matmul`.
Results must equal the results returned by the equivalent function :func:`~signatures.linear_algebra_functions.matmul`.

**Raises**

Expand Down Expand Up @@ -646,7 +646,7 @@ def __mod__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.remainder`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.remainder`.
"""

def __mul__(self: array, other: Union[int, float, array], /) -> array:
Expand Down Expand Up @@ -685,7 +685,7 @@ def __mul__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.multiply`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.multiply`.
"""

def __ne__(self: array, other: Union[int, float, bool, array], /) -> array:
Expand All @@ -706,7 +706,7 @@ def __ne__(self: array, other: Union[int, float, bool, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.not_equal`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.not_equal`.
"""

def __neg__(self: array, /) -> array:
Expand All @@ -728,7 +728,7 @@ def __neg__(self: array, /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.negative`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.negative`.
"""

def __or__(self: array, other: Union[int, bool, array], /) -> array:
Expand All @@ -749,7 +749,7 @@ def __or__(self: array, other: Union[int, bool, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.bitwise_or`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.bitwise_or`.
"""

def __pos__(self: array, /) -> array:
Expand All @@ -768,7 +768,7 @@ def __pos__(self: array, /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.positive`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.positive`.
"""

def __pow__(self: array, other: Union[int, float, array], /) -> array:
Expand Down Expand Up @@ -823,7 +823,7 @@ def __pow__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.pow`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.pow`.
"""

def __rshift__(self: array, other: Union[int, array], /) -> array:
Expand All @@ -844,7 +844,7 @@ def __rshift__(self: array, other: Union[int, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.bitwise_right_shift`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.bitwise_right_shift`.
"""

def __setitem__(self: array, key: Union[int, slice, ellipsis, Tuple[Union[int, slice, ellipsis], ...], array], value: Union[int, float, bool, array], /) -> None:
Expand Down Expand Up @@ -888,7 +888,7 @@ def __sub__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.subtract`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.subtract`.
"""

def __truediv__(self: array, other: Union[int, float, array], /) -> array:
Expand Down Expand Up @@ -941,7 +941,7 @@ def __truediv__(self: array, other: Union[int, float, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.divide`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.divide`.
"""

def __xor__(self: array, other: Union[int, bool, array], /) -> array:
Expand All @@ -962,7 +962,7 @@ def __xor__(self: array, other: Union[int, bool, array], /) -> array:


.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`signatures.elementwise_functions.bitwise_xor`.
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~signatures.elementwise_functions.bitwise_xor`.
"""

def to_device(self: array, device: Device, /, *, stream: Optional[Union[int, Any]] = None) -> array:
Expand Down
Loading