Skip to content

Commit a38af8c

Browse files
authored
Merge pull request #1861 from IntelPython/fix-documentation-build-warnings
[MAINT] Fix warnings when building docs
2 parents 2037d49 + 2006479 commit a38af8c

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
* Remove unnecessary include in C++ header file [gh-1846](https://github.com/IntelPython/dpctl/pull/1846)
2626
* Build translation unit "simplify_iteration_space.cpp" compiled multiple times as a static library [gh-1847](https://github.com/IntelPython/dpctl/pull/1847)
2727
* Fix warning in documentation generation caused by `diff` docstring [gh-1855](https://github.com/IntelPython/dpctl/pull/1855)
28+
* Fix additional warnings when generating docs [gh-1861](https://github.com/IntelPython/dpctl/pull/1861)
2829

2930
## [0.18.0] - Sept. XX, 2024
3031

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/_indexing_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def take_along_axis(x, indices, /, *, axis=-1, mode="wrap"):
460460
usm_ndarray:
461461
an array having the same data type as ``x``. The returned array has
462462
the same rank (i.e., number of dimensions) as ``x`` and a shape
463-
determined according to :ref:`broadcasting`, except for the axis
463+
determined according to broadcasting rules, except for the axis
464464
(dimension) specified by ``axis`` whose size must equal the size
465465
of the corresponding axis (dimension) in ``indices``.
466466

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)