Skip to content

Commit 301d60c

Browse files
committed
Add an empty line as a separator to Default value in docstrings.
Disable pylint `duplicate-code` checker due to false-possitive issues reported.
1 parent 0f463e9 commit 301d60c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

dpnp/dpnp_iface_nanfunctions.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
3838
"""
3939

40+
# pylint: disable=duplicate-code
41+
4042
import warnings
4143

4244
import dpnp
@@ -980,34 +982,40 @@ def nanstd(
980982
If a tuple of unique integers is given, the standard deviations are
981983
computed over multiple axes. If ``None``, the standard deviation is
982984
computed over the entire array.
985+
983986
Default: ``None``.
984987
dtype : {None, dtype}, optional
985988
Type to use in computing the standard deviation. By default, if `a` has
986989
a floating-point data type, the returned array will have the same data
987990
type as `a`. If `a` has a boolean or integral data type, the returned
988991
array will have the default floating point data type for the device
989992
where input array `a` is allocated.
993+
990994
Default: ``None``.
991995
out : {None, dpnp.ndarray, usm_ndarray}, optional
992996
Alternative output array in which to place the result. It must have
993997
the same shape as the expected output but the type (of the calculated
994998
values) will be cast if necessary.
999+
9951000
Default: ``None``.
9961001
ddof : {int, float}, optional
9971002
Means Delta Degrees of Freedom. The divisor used in calculations is
9981003
``N - ddof``, where ``N`` the number of non-NaN elements.
1004+
9991005
Default: ``0.0``.
10001006
keepdims : {None, bool}, optional
10011007
If ``True``, the reduced axes (dimensions) are included in the result
10021008
as singleton dimensions, so that the returned array remains compatible
10031009
with the input array according to Array Broadcasting rules. Otherwise,
10041010
if ``False``, the reduced axes are not included in the returned array.
1011+
10051012
Default: ``False``.
10061013
mean : {dpnp.ndarray, usm_ndarray}, optional
10071014
Provide the mean to prevent its recalculation. The mean should have
10081015
a shape as if it was calculated with ``keepdims=True``.
10091016
The axis for the calculation of the mean should be the same as used in
10101017
the call to this `nanstd` function.
1018+
10111019
Default: ``None``.
10121020
10131021
Returns
@@ -1114,34 +1122,40 @@ def nanvar(
11141122
Axis or axes along which the variances must be computed. If a tuple
11151123
of unique integers is given, the variances are computed over multiple
11161124
axes. If ``None``, the variance is computed over the entire array.
1125+
11171126
Default: ``None``.
11181127
dtype : {None, dtype}, optional
11191128
Type to use in computing the variance. By default, if `a` has a
11201129
floating-point data type, the returned array will have
11211130
the same data type as `a`. If `a` has a boolean or integral data type,
11221131
the returned array will have the default floating point data type for
11231132
the device where input array `a` is allocated.
1133+
11241134
Default: ``None``.
11251135
out : {None, dpnp.ndarray, usm_ndarray}, optional
11261136
Alternative output array in which to place the result. It must have
11271137
the same shape as the expected output but the type (of the calculated
11281138
values) will be cast if necessary.
1139+
11291140
Default: ``None``.
11301141
ddof : {int, float}, optional
11311142
Means Delta Degrees of Freedom. The divisor used in calculations is
11321143
``N - ddof``, where ``N`` represents the number of non-NaN elements.
1144+
11331145
Default: ``0.0``.
11341146
keepdims : {None, bool}, optional
11351147
If ``True``, the reduced axes (dimensions) are included in the result
11361148
as singleton dimensions, so that the returned array remains compatible
11371149
with the input array according to Array Broadcasting rules. Otherwise,
11381150
if ``False``, the reduced axes are not included in the returned array.
1151+
11391152
Default: ``False``.
11401153
mean : {dpnp.ndarray, usm_ndarray}, optional
11411154
Provide the mean to prevent its recalculation. The mean should have
11421155
a shape as if it was calculated with ``keepdims=True``.
11431156
The axis for the calculation of the mean should be the same as used in
11441157
the call to this `nanvar` function.
1158+
11451159
Default: ``None``.
11461160
11471161
Returns

dpnp/dpnp_iface_statistics.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,35 +1135,41 @@ def std(
11351135
If a tuple of unique integers is given, the standard deviations
11361136
are computed over multiple axes. If ``None``, the standard deviation
11371137
is computed over the entire array.
1138+
11381139
Default: ``None``.
11391140
dtype : {None, dtype}, optional
11401141
Type to use in computing the standard deviation. By default, if `a` has
11411142
a floating-point data type, the returned array will have the same data
11421143
type as `a`. If `a` has a boolean or integral data type, the returned
11431144
array will have the default floating point data type for the device
11441145
where input array `a` is allocated.
1146+
11451147
Default: ``None``.
11461148
out : {None, dpnp.ndarray, usm_ndarray}, optional
11471149
Alternative output array in which to place the result. It must have
11481150
the same shape as the expected output but the type (of the calculated
11491151
values) will be cast if necessary.
1152+
11501153
Default: ``None``.
11511154
ddof : {int, float}, optional
11521155
Means Delta Degrees of Freedom. The divisor used in calculations is
11531156
``N - ddof``, where ``N`` corresponds to the total number of elements
11541157
over which the standard deviation is calculated.
1158+
11551159
Default: ``0.0``.
11561160
keepdims : {None, bool}, optional
11571161
If ``True``, the reduced axes (dimensions) are included in the result
11581162
as singleton dimensions, so that the returned array remains compatible
11591163
with the input array according to Array Broadcasting rules. Otherwise,
11601164
if ``False``, the reduced axes are not included in the returned array.
1165+
11611166
Default: ``False``.
11621167
mean : {dpnp.ndarray, usm_ndarray}, optional
11631168
Provide the mean to prevent its recalculation. The mean should have
11641169
a shape as if it was calculated with ``keepdims=True``.
11651170
The axis for the calculation of the mean should be the same as used in
11661171
the call to this `std` function.
1172+
11671173
Default: ``None``.
11681174
11691175
Returns
@@ -1309,35 +1315,41 @@ def var(
13091315
Axis or axes along which the variances must be computed. If a tuple
13101316
of unique integers is given, the variances are computed over multiple
13111317
axes. If ``None``, the variance is computed over the entire array.
1318+
13121319
Default: ``None``.
13131320
dtype : {None, dtype}, optional
13141321
Type to use in computing the variance. By default, if `a` has a
13151322
floating-point data type, the returned array will have the same data
13161323
type as `a`. If `a` has a boolean or integral data type, the returned
13171324
array will have the default floating point data type for the device
13181325
where input array `a` is allocated.
1326+
13191327
Default: ``None``.
13201328
out : {None, dpnp.ndarray, usm_ndarray}, optional
13211329
Alternative output array in which to place the result. It must have
13221330
the same shape as the expected output but the type (of the calculated
13231331
values) will be cast if necessary.
1332+
13241333
Default: ``None``.
13251334
ddof : {int, float}, optional
13261335
Means Delta Degrees of Freedom. The divisor used in calculations is
13271336
``N - ddof``, where ``N`` corresponds to the total number of elements
13281337
over which the variance is calculated.
1338+
13291339
Default: ``0.0``.
13301340
keepdims : {None, bool}, optional
13311341
If ``True``, the reduced axes (dimensions) are included in the result
13321342
as singleton dimensions, so that the returned array remains compatible
13331343
with the input array according to Array Broadcasting rules. Otherwise,
13341344
if ``False``, the reduced axes are not included in the returned array.
1345+
13351346
Default: ``False``.
13361347
mean : {dpnp.ndarray, usm_ndarray}, optional
13371348
Provide the mean to prevent its recalculation. The mean should have
13381349
a shape as if it was calculated with ``keepdims=True``.
13391350
The axis for the calculation of the mean should be the same as used in
13401351
the call to this `var` function.
1352+
13411353
Default: ``None``.
13421354
13431355
Returns

0 commit comments

Comments
 (0)