Skip to content

Fix a few sphinx-build errors and warnings #1786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/dpctl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.. include:: ./ext_links.txt

Interplay with the Data Parallel Control Library
===============================================
================================================

`Data Parallel Control Library`_ provides API to manage specific
`SYCL*`_ resources for SYCL-based Python packages.
Expand Down
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Data Parallel Extension for NumPy*
==================================

.. module:: dpnp
:noindex:

.. toctree::
:maxdepth: 2
Expand Down
4 changes: 2 additions & 2 deletions doc/quick_start_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Follow device driver installation instructions to complete the step.


Python Interpreter
=================
==================

You will need Python 3.8, 3.9, or 3.10 installed on your system. If you
do not have one yet the easiest way to do that is to install
Expand All @@ -38,7 +38,7 @@ Installation
============

Install Package from Anaconda
---------------------
-----------------------------

It is recommended to use conda packages from the ``anaconda.org/intel``
channel. You will need one of the commands below:
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Numerical ranges


Building matrices
---------------
-----------------

.. autosummary::
:toctree: generated/
Expand Down
5 changes: 2 additions & 3 deletions doc/reference/dtypes_table.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Available array data types
==========================

.. _Data types:

Available array data types
==========================

Table below shows a list of all supported data types (dtypes) and constants of the Data Parallel Extension for NumPy*.

Expand Down
2 changes: 1 addition & 1 deletion doc/reference/linalg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Matrix eigenvalues
dpnp.linalg.eigvalsh

Norms and other numbers
----------
-----------------------

.. autosummary::
:toctree: generated/
Expand Down
3 changes: 1 addition & 2 deletions doc/reference/ndarray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ For the following methods there are also corresponding functions in
:func:`diagonal <dpnp.diagonal>`, :func:`imag <dpnp.imag>`,
:func:`max <dpnp.max>`, :func:`mean <dpnp.mean>`, :func:`min <dpnp.min>`,
:func:`nonzero <dpnp.nonzero>`, :func:`partition <dpnp.partition>`,
:func:`prod <dpnp.prod>`, :func:`ptp <dpnp.ptp>`, :func:`put <dpnp.put>`,
:func:`prod <dpnp.prod>`, :func:`put <dpnp.put>`,
:func:`ravel <dpnp.ravel>`, :func:`real <dpnp.real>`, :func:`repeat <dpnp.repeat>`,
:func:`reshape <dpnp.reshape>`, :func:`round <dpnp.around>`,
:func:`searchsorted <dpnp.searchsorted>`, :func:`sort <dpnp.sort>`,
Expand Down Expand Up @@ -204,7 +204,6 @@ Calculation
dpnp.ndarray.argmax
dpnp.ndarray.min
dpnp.ndarray.argmin
dpnp.ndarray.ptp
dpnp.ndarray.clip
dpnp.ndarray.conj
dpnp.ndarray.conjugate
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/statistics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Order statistics


Averages and variances
-------------------
----------------------

.. autosummary::
:toctree: generated/
Expand Down
12 changes: 7 additions & 5 deletions dpnp/dpnp_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,11 +550,13 @@ def astype(self, dtype, order="K", casting="unsafe", subok=True, copy=True):
Otherwise, a copy is returned.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
Controls what kind of data casting may occur. Defaults to 'unsafe' for backwards compatibility.
'no' means the data types should not be cast at all.
'equiv' means only byte-order changes are allowed.
'safe' means only casts which can preserve values are allowed.
'same_kind' means only safe casts or casts within a kind, like float64 to float32, are allowed.
'unsafe' means any data conversions may be done.

- 'no' means the data types should not be cast at all.
- 'equiv' means only byte-order changes are allowed.
- 'safe' means only casts which can preserve values are allowed.
- 'same_kind' means only safe casts or casts within a kind, like float64 to float32, are allowed.
- 'unsafe' means any data conversions may be done.

copy : bool, optional
By default, astype always returns a newly allocated array. If this is set to false, and the dtype,
order, and subok requirements are satisfied, the input array is returned instead of a copy.
Expand Down
4 changes: 3 additions & 1 deletion dpnp/dpnp_iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,14 @@ def astype(x1, dtype, order="K", casting="unsafe", copy=True):
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
Controls what kind of data casting may occur. Defaults to ``unsafe``
for backwards compatibility.

- 'no' means the data types should not be cast at all.
- 'equiv' means only byte-order changes are allowed.
- 'safe' means only casts which can preserve values are allowed.
- 'same_kind' means only safe casts or casts within a kind, like
float64 to float32, are allowed.
float64 to float32, are allowed.
- 'unsafe' means any data conversions may be done.

copy : bool, optional
By default, astype always returns a newly allocated array. If this
is set to ``False``, and the dtype, order, and subok requirements
Expand Down
2 changes: 2 additions & 0 deletions dpnp/dpnp_iface_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def finfo(dtype):
-------
out : finfo_object
An object have the following attributes

* bits: int
number of bits occupied by dtype.
* dtype: dtype
Expand Down Expand Up @@ -212,6 +213,7 @@ def iinfo(dtype):
-------
out : iinfo_object
An object with the following attributes

* bits: int
number of bits occupied by the data type
* dtype: dtype
Expand Down
4 changes: 2 additions & 2 deletions dpnp/linalg/dpnp_iface_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,12 @@ def inv(a):
array([ True])

Inverses of several matrices can be computed at once:

>>> a = np.array([[[1., 2.], [3., 4.]], [[1, 3], [3, 5]]])
>>> np.linalg.inv(a)
array([[[-2. , 1. ],
[ 1.5 , -0.5 ]],

[[-1.25, 0.75],
[[-1.25, 0.75],
[ 0.75, -0.25]]])

"""
Expand Down