Skip to content

Commit bef64de

Browse files
Fix dpnp docstrings for the numpydoc switch
1 parent fb0181a commit bef64de

9 files changed

Lines changed: 20 additions & 24 deletions

‎dpnp/dpnp_array.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,8 +1986,8 @@ def sort(
19861986
:obj:`dpnp.searchsorted` : Find elements in a sorted array.
19871987
:obj:`dpnp.partition` : Partial sort.
19881988
1989-
Note
1990-
----
1989+
Notes
1990+
-----
19911991
`axis` in :obj:`dpnp.sort` could be integer or ``None``. If ``None``,
19921992
the array is flattened before sorting. However, `axis` in
19931993
:obj:`dpnp.ndarray.sort` can only be integer since it sorts an array

‎dpnp/dpnp_iface_linearalgebra.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def einsum(
257257
The calculation based on the Einstein summation convention.
258258
259259
See Also
260-
-------
260+
--------
261261
:obj:`dpnp.einsum_path` : Evaluates the lowest cost contraction order
262262
for an einsum expression.
263263
:obj:`dpnp.dot` : Returns the dot product of two arrays.

‎dpnp/dpnp_iface_manipulation.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ def asarray_chkfinite(
749749
already an ndarray.
750750
751751
Raises
752-
-------
752+
------
753753
ValueError
754754
Raises ``ValueError`` if `a` contains NaN (Not a Number) or
755755
Inf (Infinity).

‎dpnp/dpnp_iface_mathematical.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,7 +2329,7 @@ def ediff1d(ary, to_end=None, to_begin=None):
23292329
returned array is determined by the Type Promotion Rules.
23302330
23312331
Limitations
2332-
----------
2332+
-----------
23332333
Parameters `where` and `subok` are supported with their default values.
23342334
Keyword argument `kwargs` is currently unsupported.
23352335
Otherwise ``NotImplementedError`` exception will be raised.
@@ -3929,8 +3929,8 @@ def _check_nan_inf(val, val_dt):
39293929
:obj:`dpnp.negative` : Return the numerical negative of each element of `x`.
39303930
:obj:`dpnp.copysign` : Change the sign of `x1` to that of `x2`, element-wise.
39313931
3932-
Note
3933-
----
3932+
Notes
3933+
-----
39343934
Equivalent to `x.copy()`, but only defined for types that support arithmetic.
39353935
39363936
Examples

‎dpnp/dpnp_iface_nanfunctions.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ def nanargmax(a, axis=None, out=None, *, keepdims=False):
129129
the user is recommended to filter NaNs themselves and use `dpnp.argmax`
130130
on the filtered array.
131131
132-
Warnings
133-
--------
134132
The results cannot be trusted if a slice contains only NaNs
135133
and -Infs.
136134
@@ -213,8 +211,6 @@ def nanargmin(a, axis=None, out=None, *, keepdims=False):
213211
the user is recommended to filter NaNs themselves and use `dpnp.argmax`
214212
on the filtered array.
215213
216-
Warnings
217-
--------
218214
The results cannot be trusted if a slice contains only NaNs
219215
and -Infs.
220216

‎dpnp/dpnp_iface_trigonometric.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,8 @@ def cumlogsumexp(
907907
:obj:`dpnp.logsumexp` : Logarithm of the sum of elements of the inputs,
908908
element-wise.
909909
910-
Note
911-
----
910+
Notes
911+
-----
912912
This function is equivalent of `numpy.logaddexp.accumulate`.
913913
914914
Examples
@@ -1889,8 +1889,8 @@ def logsumexp(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
18891889
:obj:`dpnp.cumlogsumexp` : Cumulative the natural logarithm of the sum of
18901890
elements in the input array.
18911891
1892-
Note
1893-
----
1892+
Notes
1893+
-----
18941894
This function is equivalent of `numpy.logaddexp.reduce`.
18951895
18961896
Examples
@@ -2171,8 +2171,8 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
21712171
--------
21722172
:obj:`dpnp.hypot` : Calculates :math:`\sqrt{x1^2 + x2^2}`, element-wise.
21732173
2174-
Note
2175-
----
2174+
Notes
2175+
-----
21762176
This function is equivalent of `numpy.hypot.reduce`.
21772177
21782178
Examples

‎dpnp/fft/dpnp_iface_fft.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ def hfft(a, n=None, axis=-1, norm=None, out=None):
559559
--------
560560
:obj:`dpnp.fft` : For definition of the DFT and conventions used.
561561
:obj:`dpnp.fft.rfft` : The one-dimensional FFT of real input.
562-
:obj:`dpnp.fft.ihfft` :The inverse of :obj:`dpnp.fft.hfft`.
562+
:obj:`dpnp.fft.ihfft` : The inverse of :obj:`dpnp.fft.hfft`.
563563
564564
565565
Notes
@@ -1101,7 +1101,7 @@ def irfft(a, n=None, axis=-1, norm=None, out=None):
11011101
:obj:`dpnp.fft.rfft` : The one-dimensional FFT of real input, of which
11021102
:obj:`dpnp.fft.irfft` is inverse.
11031103
:obj:`dpnp.fft.fft` : The one-dimensional FFT of general (complex) input.
1104-
:obj:`dpnp.fft.irfft2` :The inverse of the two-dimensional FFT of
1104+
:obj:`dpnp.fft.irfft2` : The inverse of the two-dimensional FFT of
11051105
real input.
11061106
:obj:`dpnp.fft.irfftn` : The inverse of the *N*-dimensional FFT of
11071107
real input.

‎dpnp/linalg/dpnp_iface_linalg.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,8 @@ def eig(a):
481481
``eigenvectors[:,i]`` is the eigenvector corresponding to the
482482
eigenvalue ``eigenvalues[i]``.
483483
484-
Note
485-
----
484+
Notes
485+
-----
486486
Since there is no proper OneMKL LAPACK function, DPNP will calculate
487487
through a fallback on NumPy call.
488488
@@ -645,8 +645,8 @@ def eigvals(a):
645645
They are not necessarily ordered, nor are they necessarily
646646
real for real matrices.
647647
648-
Note
649-
----
648+
Notes
649+
-----
650650
Since there is no proper OneMKL LAPACK function, DPNP will calculate
651651
through a fallback on NumPy call.
652652

‎dpnp/linalg/dpnp_utils_linalg.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ def _calculate_determinant_sign(ipiv, diag, res_type, n):
736736
values.
737737
738738
Parameters
739-
-----------
739+
----------
740740
ipiv : {dpnp.ndarray, usm_ndarray}
741741
The pivot indices from LU decomposition.
742742
diag : {dpnp.ndarray, usm_ndarray}

0 commit comments

Comments
 (0)