Skip to content

Commit

Permalink
Add an empty line as a separator to Default value in docstrings.
Browse files Browse the repository at this point in the history
Disable pylint `duplicate-code` checker due to false-possitive issues
reported.
  • Loading branch information
antonwolfy committed Jan 22, 2025
1 parent 0f463e9 commit 301d60c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dpnp/dpnp_iface_nanfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
"""

# pylint: disable=duplicate-code

import warnings

import dpnp
Expand Down Expand Up @@ -980,34 +982,40 @@ def nanstd(
If a tuple of unique integers is given, the standard deviations are
computed over multiple axes. If ``None``, the standard deviation is
computed over the entire array.
Default: ``None``.
dtype : {None, dtype}, optional
Type to use in computing the standard deviation. By default, if `a` has
a floating-point data type, the returned array will have the same data
type as `a`. If `a` has a boolean or integral data type, the returned
array will have the default floating point data type for the device
where input array `a` is allocated.
Default: ``None``.
out : {None, dpnp.ndarray, usm_ndarray}, optional
Alternative output array in which to place the result. It must have
the same shape as the expected output but the type (of the calculated
values) will be cast if necessary.
Default: ``None``.
ddof : {int, float}, optional
Means Delta Degrees of Freedom. The divisor used in calculations is
``N - ddof``, where ``N`` the number of non-NaN elements.
Default: ``0.0``.
keepdims : {None, bool}, optional
If ``True``, the reduced axes (dimensions) are included in the result
as singleton dimensions, so that the returned array remains compatible
with the input array according to Array Broadcasting rules. Otherwise,
if ``False``, the reduced axes are not included in the returned array.
Default: ``False``.
mean : {dpnp.ndarray, usm_ndarray}, optional
Provide the mean to prevent its recalculation. The mean should have
a shape as if it was calculated with ``keepdims=True``.
The axis for the calculation of the mean should be the same as used in
the call to this `nanstd` function.
Default: ``None``.
Returns
Expand Down Expand Up @@ -1114,34 +1122,40 @@ def nanvar(
Axis or axes along which the variances must be computed. If a tuple
of unique integers is given, the variances are computed over multiple
axes. If ``None``, the variance is computed over the entire array.
Default: ``None``.
dtype : {None, dtype}, optional
Type to use in computing the variance. By default, if `a` has a
floating-point data type, the returned array will have
the same data type as `a`. If `a` has a boolean or integral data type,
the returned array will have the default floating point data type for
the device where input array `a` is allocated.
Default: ``None``.
out : {None, dpnp.ndarray, usm_ndarray}, optional
Alternative output array in which to place the result. It must have
the same shape as the expected output but the type (of the calculated
values) will be cast if necessary.
Default: ``None``.
ddof : {int, float}, optional
Means Delta Degrees of Freedom. The divisor used in calculations is
``N - ddof``, where ``N`` represents the number of non-NaN elements.
Default: ``0.0``.
keepdims : {None, bool}, optional
If ``True``, the reduced axes (dimensions) are included in the result
as singleton dimensions, so that the returned array remains compatible
with the input array according to Array Broadcasting rules. Otherwise,
if ``False``, the reduced axes are not included in the returned array.
Default: ``False``.
mean : {dpnp.ndarray, usm_ndarray}, optional
Provide the mean to prevent its recalculation. The mean should have
a shape as if it was calculated with ``keepdims=True``.
The axis for the calculation of the mean should be the same as used in
the call to this `nanvar` function.
Default: ``None``.
Returns
Expand Down
12 changes: 12 additions & 0 deletions dpnp/dpnp_iface_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,35 +1135,41 @@ def std(
If a tuple of unique integers is given, the standard deviations
are computed over multiple axes. If ``None``, the standard deviation
is computed over the entire array.
Default: ``None``.
dtype : {None, dtype}, optional
Type to use in computing the standard deviation. By default, if `a` has
a floating-point data type, the returned array will have the same data
type as `a`. If `a` has a boolean or integral data type, the returned
array will have the default floating point data type for the device
where input array `a` is allocated.
Default: ``None``.
out : {None, dpnp.ndarray, usm_ndarray}, optional
Alternative output array in which to place the result. It must have
the same shape as the expected output but the type (of the calculated
values) will be cast if necessary.
Default: ``None``.
ddof : {int, float}, optional
Means Delta Degrees of Freedom. The divisor used in calculations is
``N - ddof``, where ``N`` corresponds to the total number of elements
over which the standard deviation is calculated.
Default: ``0.0``.
keepdims : {None, bool}, optional
If ``True``, the reduced axes (dimensions) are included in the result
as singleton dimensions, so that the returned array remains compatible
with the input array according to Array Broadcasting rules. Otherwise,
if ``False``, the reduced axes are not included in the returned array.
Default: ``False``.
mean : {dpnp.ndarray, usm_ndarray}, optional
Provide the mean to prevent its recalculation. The mean should have
a shape as if it was calculated with ``keepdims=True``.
The axis for the calculation of the mean should be the same as used in
the call to this `std` function.
Default: ``None``.
Returns
Expand Down Expand Up @@ -1309,35 +1315,41 @@ def var(
Axis or axes along which the variances must be computed. If a tuple
of unique integers is given, the variances are computed over multiple
axes. If ``None``, the variance is computed over the entire array.
Default: ``None``.
dtype : {None, dtype}, optional
Type to use in computing the variance. By default, if `a` has a
floating-point data type, the returned array will have the same data
type as `a`. If `a` has a boolean or integral data type, the returned
array will have the default floating point data type for the device
where input array `a` is allocated.
Default: ``None``.
out : {None, dpnp.ndarray, usm_ndarray}, optional
Alternative output array in which to place the result. It must have
the same shape as the expected output but the type (of the calculated
values) will be cast if necessary.
Default: ``None``.
ddof : {int, float}, optional
Means Delta Degrees of Freedom. The divisor used in calculations is
``N - ddof``, where ``N`` corresponds to the total number of elements
over which the variance is calculated.
Default: ``0.0``.
keepdims : {None, bool}, optional
If ``True``, the reduced axes (dimensions) are included in the result
as singleton dimensions, so that the returned array remains compatible
with the input array according to Array Broadcasting rules. Otherwise,
if ``False``, the reduced axes are not included in the returned array.
Default: ``False``.
mean : {dpnp.ndarray, usm_ndarray}, optional
Provide the mean to prevent its recalculation. The mean should have
a shape as if it was calculated with ``keepdims=True``.
The axis for the calculation of the mean should be the same as used in
the call to this `var` function.
Default: ``None``.
Returns
Expand Down

0 comments on commit 301d60c

Please sign in to comment.