Skip to content

Update docstrings for sorting functions #2375

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 2 commits into from
Mar 20, 2025
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
8 changes: 8 additions & 0 deletions dpnp/dpnp_iface_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,26 @@ def argsort(
axis : {None, int}, optional
Axis along which to sort. If ``None``, the array is flattened before
sorting. The default is ``-1``, which sorts along the last axis.

Default: ``-1``.
kind : {None, "stable", "mergesort", "radixsort"}, optional
Sorting algorithm. The default is ``None``, which uses parallel
merge-sort or parallel radix-sort algorithms depending on the array
data type.

Default: ``None``.
descending : bool, optional
Sort order. If ``True``, the array must be sorted in descending order
(by value). If ``False``, the array must be sorted in ascending order
(by value).

Default: ``False``.
stable : {None, bool}, optional
Sort stability. If ``True``, the returned array will maintain the
relative order of `a` values which compare as equal. The same behavior
applies when set to ``False`` or ``None``.
Internally, this option selects ``kind="stable"``.

Default: ``None``.

Returns
Expand Down Expand Up @@ -251,22 +255,26 @@ def sort(a, axis=-1, kind=None, order=None, *, descending=False, stable=None):
axis : {None, int}, optional
Axis along which to sort. If ``None``, the array is flattened before
sorting. The default is ``-1``, which sorts along the last axis.

Default: ``-1``.
kind : {None, "stable", "mergesort", "radixsort"}, optional
Sorting algorithm. The default is ``None``, which uses parallel
merge-sort or parallel radix-sort algorithms depending on the array
data type.

Default: ``None``.
descending : bool, optional
Sort order. If ``True``, the array must be sorted in descending order
(by value). If ``False``, the array must be sorted in ascending order
(by value).

Default: ``False``.
stable : {None, bool}, optional
Sort stability. If ``True``, the returned array will maintain the
relative order of `a` values which compare as equal. The same behavior
applies when set to ``False`` or ``None``.
Internally, this option selects ``kind="stable"``.

Default: ``None``.

Returns
Expand Down
2 changes: 1 addition & 1 deletion dpnp/dpnp_iface_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ def cov(
>>> import dpnp as np
>>> x = np.array([[0, 2], [1, 1], [2, 0]]).T

Consider two variables, :math:`x_0` and :math:`x_1`, which correlate
Consider two variables, :math:`x_0` and :math:`x_1`, which correlate
perfectly, but in opposite directions:

>>> x
Expand Down
Loading