From 3c555bfde1507dbb264b3874220aec80a166d6db Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Fri, 22 Mar 2024 20:52:12 -0400 Subject: [PATCH] add hyperlinks to array api docs --- docs/source/python_spec.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/python_spec.rst b/docs/source/python_spec.rst index 73941bf..2a82896 100644 --- a/docs/source/python_spec.rst +++ b/docs/source/python_spec.rst @@ -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.