You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transform sorting function specification file from Markdown to RST (#333)
* Transform sorting functions from md to rst file
* Fix the warning message
* Add autosummary with signatures for the sorting functions
* Bump CI python to 3.8
* Complete signatures and add types files
* Remove module names and add autodoc typehints
* Bump Sphinx version
* Remove module import from signature and return annonation
* Add jinja template for autosummary
* Put return section style as parameters and remove return type section
Returns the indices that sort an array ``x`` along a specified axis.
6
+
7
+
Parameters
8
+
----------
9
+
x : array
10
+
input array.
11
+
axis: int
12
+
axis along which to sort. If set to ``-1``, the function must sort along the last axis. Default: ``-1``.
13
+
descending: bool
14
+
sort order. If ``True``, the returned indices sort ``x`` in descending order (by value). If ``False``, the returned indices sort ``x`` in ascending order (by value). Default: ``False``.
15
+
stable: bool
16
+
sort stability. If ``True``, the returned indices must maintain the relative order of ``x`` values which compare as equal. If ``False``, the returned indices may or may not maintain the relative order of ``x`` values which compare as equal (i.e., the relative order of ``x`` values which compare as equal is implementation-dependent). Default: ``True``.
17
+
18
+
Returns
19
+
-------
20
+
out : array
21
+
an array of indices. The returned array must have the same shape as ``x``. The returned array must have the default array index data type.
axis along which to sort. If set to ``-1``, the function must sort along the last axis. Default: ``-1``.
34
+
descending: bool
35
+
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``.
36
+
stable: bool
37
+
sort stability. If ``True``, the returned array must maintain the relative order of ``x`` values which compare as equal. If ``False``, the returned array may or may not maintain the relative order of ``x`` values which compare as equal (i.e., the relative order of ``x`` values which compare as equal is implementation-dependent). Default: ``True``.
38
+
39
+
Returns
40
+
-------
41
+
out : array
42
+
a sorted array. The returned array must have the same data type and shape as ``x``.
A conforming implementation of the array API standard must provide and support the following functions adhering to the following conventions.
7
+
8
+
* Positional parameters must be `positional-only <https://www.python.org/dev/peps/pep-0570/>`_ parameters. Positional-only parameters have no externally-usable name. When a function accepting positional-only parameters is called, positional arguments are mapped to these parameters based solely on their order.
9
+
* Optional parameters must be `keyword-only <https://www.python.org/dev/peps/pep-3102/>`_ arguments.
10
+
* Unless stated otherwise, functions must support the data types defined in :ref:`data-types`.
11
+
12
+
.. note::
13
+
14
+
For floating-point input arrays, the sort order of NaNs and signed zeros is unspecified and thus implementation-dependent.
15
+
16
+
Implementations may choose to sort signed zeros (``-0 < +0``) or may choose to rely solely on value equality (``==``).
17
+
18
+
Implementations may choose to sort NaNs (e.g., to the end or to the beginning of a returned array) or leave them in-place. Should an implementation sort NaNs, the sorting convention should be clearly documented in the conforming implementation's documentation.
19
+
20
+
While defining a sort order for IEEE 754 floating-point numbers is recommended in order to facilitate reproducible and consistent sort results, doing so is not currently required by this specification.
21
+
22
+
.. currentmodule:: signatures.sorting_functions
23
+
24
+
Objects in API
25
+
--------------
26
+
..
27
+
NOTE: please keep the functions in alphabetical order
0 commit comments