Skip to content

Commit 859aa9a

Browse files
vtavanaantonwolfy
andauthored
Fix a few sphinx-build errors and warnings (#1786)
* fix title underline too short * fix failed to create cross ref for data types * dpnp_array has no attribute to ptp * fix duplicate object description, other instance in overview.rst * fix unexpected indent --------- Co-authored-by: Anton <[email protected]>
1 parent bc81605 commit 859aa9a

File tree

12 files changed

+24
-19
lines changed

12 files changed

+24
-19
lines changed

doc/dpctl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.. include:: ./ext_links.txt
33

44
Interplay with the Data Parallel Control Library
5-
===============================================
5+
================================================
66

77
`Data Parallel Control Library`_ provides API to manage specific
88
`SYCL*`_ resources for SYCL-based Python packages.

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Data Parallel Extension for NumPy*
55
==================================
66

77
.. module:: dpnp
8+
:noindex:
89

910
.. toctree::
1011
:maxdepth: 2

doc/quick_start_guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Follow device driver installation instructions to complete the step.
2222

2323

2424
Python Interpreter
25-
=================
25+
==================
2626

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

4040
Install Package from Anaconda
41-
---------------------
41+
-----------------------------
4242

4343
It is recommended to use conda packages from the ``anaconda.org/intel``
4444
channel. You will need one of the commands below:

doc/reference/creation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Numerical ranges
6363

6464

6565
Building matrices
66-
---------------
66+
-----------------
6767

6868
.. autosummary::
6969
:toctree: generated/

doc/reference/dtypes_table.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
Available array data types
2-
==========================
3-
41
.. _Data types:
52

3+
Available array data types
4+
==========================
65

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

doc/reference/linalg.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Matrix eigenvalues
4646
dpnp.linalg.eigvalsh
4747

4848
Norms and other numbers
49-
----------
49+
-----------------------
5050

5151
.. autosummary::
5252
:toctree: generated/

doc/reference/ndarray.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ For the following methods there are also corresponding functions in
115115
:func:`diagonal <dpnp.diagonal>`, :func:`imag <dpnp.imag>`,
116116
:func:`max <dpnp.max>`, :func:`mean <dpnp.mean>`, :func:`min <dpnp.min>`,
117117
:func:`nonzero <dpnp.nonzero>`, :func:`partition <dpnp.partition>`,
118-
:func:`prod <dpnp.prod>`, :func:`ptp <dpnp.ptp>`, :func:`put <dpnp.put>`,
118+
:func:`prod <dpnp.prod>`, :func:`put <dpnp.put>`,
119119
:func:`ravel <dpnp.ravel>`, :func:`real <dpnp.real>`, :func:`repeat <dpnp.repeat>`,
120120
:func:`reshape <dpnp.reshape>`, :func:`round <dpnp.around>`,
121121
:func:`searchsorted <dpnp.searchsorted>`, :func:`sort <dpnp.sort>`,
@@ -204,7 +204,6 @@ Calculation
204204
dpnp.ndarray.argmax
205205
dpnp.ndarray.min
206206
dpnp.ndarray.argmin
207-
dpnp.ndarray.ptp
208207
dpnp.ndarray.clip
209208
dpnp.ndarray.conj
210209
dpnp.ndarray.conjugate

doc/reference/statistics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Order statistics
1818

1919

2020
Averages and variances
21-
-------------------
21+
----------------------
2222

2323
.. autosummary::
2424
:toctree: generated/

dpnp/dpnp_array.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -550,11 +550,13 @@ def astype(self, dtype, order="K", casting="unsafe", subok=True, copy=True):
550550
Otherwise, a copy is returned.
551551
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
552552
Controls what kind of data casting may occur. Defaults to 'unsafe' for backwards compatibility.
553-
'no' means the data types should not be cast at all.
554-
'equiv' means only byte-order changes are allowed.
555-
'safe' means only casts which can preserve values are allowed.
556-
'same_kind' means only safe casts or casts within a kind, like float64 to float32, are allowed.
557-
'unsafe' means any data conversions may be done.
553+
554+
- 'no' means the data types should not be cast at all.
555+
- 'equiv' means only byte-order changes are allowed.
556+
- 'safe' means only casts which can preserve values are allowed.
557+
- 'same_kind' means only safe casts or casts within a kind, like float64 to float32, are allowed.
558+
- 'unsafe' means any data conversions may be done.
559+
558560
copy : bool, optional
559561
By default, astype always returns a newly allocated array. If this is set to false, and the dtype,
560562
order, and subok requirements are satisfied, the input array is returned instead of a copy.

dpnp/dpnp_iface.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,14 @@ def astype(x1, dtype, order="K", casting="unsafe", copy=True):
198198
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
199199
Controls what kind of data casting may occur. Defaults to ``unsafe``
200200
for backwards compatibility.
201+
201202
- 'no' means the data types should not be cast at all.
202203
- 'equiv' means only byte-order changes are allowed.
203204
- 'safe' means only casts which can preserve values are allowed.
204205
- 'same_kind' means only safe casts or casts within a kind, like
205-
float64 to float32, are allowed.
206+
float64 to float32, are allowed.
206207
- 'unsafe' means any data conversions may be done.
208+
207209
copy : bool, optional
208210
By default, astype always returns a newly allocated array. If this
209211
is set to ``False``, and the dtype, order, and subok requirements

dpnp/dpnp_iface_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ def finfo(dtype):
163163
-------
164164
out : finfo_object
165165
An object have the following attributes
166+
166167
* bits: int
167168
number of bits occupied by dtype.
168169
* dtype: dtype
@@ -212,6 +213,7 @@ def iinfo(dtype):
212213
-------
213214
out : iinfo_object
214215
An object with the following attributes
216+
215217
* bits: int
216218
number of bits occupied by the data type
217219
* dtype: dtype

dpnp/linalg/dpnp_iface_linalg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,12 +577,12 @@ def inv(a):
577577
array([ True])
578578
579579
Inverses of several matrices can be computed at once:
580+
580581
>>> a = np.array([[[1., 2.], [3., 4.]], [[1, 3], [3, 5]]])
581582
>>> np.linalg.inv(a)
582583
array([[[-2. , 1. ],
583584
[ 1.5 , -0.5 ]],
584-
585-
[[-1.25, 0.75],
585+
[[-1.25, 0.75],
586586
[ 0.75, -0.25]]])
587587
588588
"""

0 commit comments

Comments
 (0)