Skip to content

Commit

Permalink
add hyperlinks to array api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
leofang committed Mar 23, 2024
1 parent 695c8dd commit 3c555bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/source/python_spec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Syntax for data interchange with DLPack

The array API will offer the following syntax for data interchange:

1. A ``from_dlpack(x, ...)`` function, which accepts any (array) object with
1. A :func:`~array_api.from_dlpack()` function, which accepts any (array) object with
the two DLPack methods implemented (see below) and uses them to construct
a new array containing the data from ``x``.
2. ``__dlpack__`` and ``__dlpack_device__`` methods on the
array object, which will be called from within ``from_dlpack``, to query
a new array containing the data from the input array.
2. :meth:`~array_api.array.__dlpack__` and :meth:`~array_api.array.__dlpack_device__` methods on the
array object, which will be called from within :func:`~array_api.from_dlpack`, to query
what device the array is on (may be needed to pass in the correct
stream, e.g. in the case of multiple GPUs) and to access the data.

Expand Down

0 comments on commit 3c555bf

Please sign in to comment.