Skip to content

Commit

Permalink
Merge pull request #1861 from IntelPython/fix-documentation-build-war…
Browse files Browse the repository at this point in the history
…nings

[MAINT] Fix warnings when building docs
  • Loading branch information
ndgrigorian authored Oct 10, 2024
2 parents 2037d49 + 2006479 commit a38af8c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Remove unnecessary include in C++ header file [gh-1846](https://github.com/IntelPython/dpctl/pull/1846)
* Build translation unit "simplify_iteration_space.cpp" compiled multiple times as a static library [gh-1847](https://github.com/IntelPython/dpctl/pull/1847)
* Fix warning in documentation generation caused by `diff` docstring [gh-1855](https://github.com/IntelPython/dpctl/pull/1855)
* Fix additional warnings when generating docs [gh-1861](https://github.com/IntelPython/dpctl/pull/1861)

## [0.18.0] - Sept. XX, 2024

Expand Down
1 change: 1 addition & 0 deletions docs/doc_sources/beginners_guides/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Binary wheels of ``dpctl`` and its dependencies are also published on Intel(R) c
use

.. code-block:: bash
python -m pip install --index-url https://software.repos.intel.com/python/pypi dpctl
.. note::
Expand Down
11 changes: 4 additions & 7 deletions dpctl/tensor/_dlpack.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ cdef object _create_device(object device, object dl_device):


def from_dlpack(x, /, *, device=None, copy=None):
""" from_dlpack(x, /, *, device=None, copy=None)
"""from_dlpack(x, /, *, device=None, copy=None)
Constructs :class:`dpctl.tensor.usm_ndarray` instance from a Python
object ``x`` that implements ``__dlpack__`` protocol.
Expand All @@ -972,11 +972,7 @@ def from_dlpack(x, /, *, device=None, copy=None):
x (object):
A Python object representing an array that supports
``__dlpack__`` protocol.
device (Optional[str,
:class:`dpctl.SyclDevice`,
:class:`dpctl.SyclQueue`,
:class:`dpctl.tensor.Device`,
tuple([enum.Enum, int])])):
device (Optional[str, :class:`dpctl.SyclDevice`, :class:`dpctl.SyclQueue`, :class:`dpctl.tensor.Device`, tuple([:class:`enum.IntEnum`, int])])):
Array API concept of a device where the output array is to be placed.
``device`` can be ``None``, a oneAPI filter selector
string, an instance of :class:`dpctl.SyclDevice` corresponding to
Expand All @@ -986,7 +982,8 @@ def from_dlpack(x, /, *, device=None, copy=None):
2-tuple matching the format of the output of the ``__dlpack_device__``
method, an integer enumerator representing the device type followed by
an integer representing the index of the device. The only supported
:enum:`dpctl.tensor.DLDeviceType` types are "kDLCPU" and "kDLOneAPI".
:class:`dpctl.tensor.DLDeviceType` types are "kDLCPU" and
"kDLOneAPI".
Default: ``None``.
copy (bool, optional)
Boolean indicating whether or not to copy the input.
Expand Down
2 changes: 1 addition & 1 deletion dpctl/tensor/_indexing_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def take_along_axis(x, indices, /, *, axis=-1, mode="wrap"):
usm_ndarray:
an array having the same data type as ``x``. The returned array has
the same rank (i.e., number of dimensions) as ``x`` and a shape
determined according to :ref:`broadcasting`, except for the axis
determined according to broadcasting rules, except for the axis
(dimension) specified by ``axis`` whose size must equal the size
of the corresponding axis (dimension) in ``indices``.
Expand Down
4 changes: 2 additions & 2 deletions dpctl/tensor/_usmarray.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ include "_slicing.pxi"

class DLDeviceType(IntEnum):
"""
An ``IntEnum`` for the types of DLDevices supported by the DLPack
protocol.
An :class:`enum.IntEnum` for the types of DLDevices supported by the DLPack protocol.
``kDLCPU``:
CPU (host) device
``kDLCUDA``:
Expand Down

0 comments on commit a38af8c

Please sign in to comment.