Skip to content

Commit 8888872

Browse files
committed
Fix warnings raised when building documentation
Fixed - Incorrect use of :enum: in _dlpack.pyx - Spacing issues in `from_dlpack` docstring - Spacing issues in `DLDeviceType` docstring - Spacing issue in new instructions for wheel installation using Intel channel in installation.rst
1 parent 5295873 commit 8888872

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

docs/doc_sources/beginners_guides/installation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Binary wheels of ``dpctl`` and its dependencies are also published on Intel(R) c
5959
use
6060

6161
.. code-block:: bash
62+
6263
python -m pip install --index-url https://software.repos.intel.com/python/pypi dpctl
6364
6465
.. note::

dpctl/tensor/_dlpack.pyx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ cdef object _create_device(object device, object dl_device):
963963

964964

965965
def from_dlpack(x, /, *, device=None, copy=None):
966-
""" from_dlpack(x, /, *, device=None, copy=None)
966+
"""from_dlpack(x, /, *, device=None, copy=None)
967967
968968
Constructs :class:`dpctl.tensor.usm_ndarray` instance from a Python
969969
object ``x`` that implements ``__dlpack__`` protocol.
@@ -972,11 +972,7 @@ def from_dlpack(x, /, *, device=None, copy=None):
972972
x (object):
973973
A Python object representing an array that supports
974974
``__dlpack__`` protocol.
975-
device (Optional[str,
976-
:class:`dpctl.SyclDevice`,
977-
:class:`dpctl.SyclQueue`,
978-
:class:`dpctl.tensor.Device`,
979-
tuple([enum.Enum, int])])):
975+
device (Optional[str, :class:`dpctl.SyclDevice`, :class:`dpctl.SyclQueue`, :class:`dpctl.tensor.Device`, tuple([:class:`enum.IntEnum`, int])])):
980976
Array API concept of a device where the output array is to be placed.
981977
``device`` can be ``None``, a oneAPI filter selector
982978
string, an instance of :class:`dpctl.SyclDevice` corresponding to
@@ -986,7 +982,8 @@ def from_dlpack(x, /, *, device=None, copy=None):
986982
2-tuple matching the format of the output of the ``__dlpack_device__``
987983
method, an integer enumerator representing the device type followed by
988984
an integer representing the index of the device. The only supported
989-
:enum:`dpctl.tensor.DLDeviceType` types are "kDLCPU" and "kDLOneAPI".
985+
:class:`dpctl.tensor.DLDeviceType` types are "kDLCPU" and
986+
"kDLOneAPI".
990987
Default: ``None``.
991988
copy (bool, optional)
992989
Boolean indicating whether or not to copy the input.

dpctl/tensor/_usmarray.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ include "_slicing.pxi"
5555

5656
class DLDeviceType(IntEnum):
5757
"""
58-
An ``IntEnum`` for the types of DLDevices supported by the DLPack
59-
protocol.
58+
An :class:`enum.IntEnum` for the types of DLDevices supported by the DLPack protocol.
59+
6060
``kDLCPU``:
6161
CPU (host) device
6262
``kDLCUDA``:

0 commit comments

Comments
 (0)