$77 GRAYBYTE WORDPRESS FILE MANAGER $63

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.174
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/array_api/tests/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/array_api/tests//test_sorting_functions.py
import pytest

from numpy import array_api as xp


@pytest.mark.parametrize(
    "obj, axis, expected",
    [
        ([0, 0], -1, [0, 1]),
        ([0, 1, 0], -1, [1, 0, 2]),
        ([[0, 1], [1, 1]], 0, [[1, 0], [0, 1]]),
        ([[0, 1], [1, 1]], 1, [[1, 0], [0, 1]]),
    ],
)
def test_stable_desc_argsort(obj, axis, expected):
    """
    Indices respect relative order of a descending stable-sort

    See https://github.com/numpy/numpy/issues/20778
    """
    x = xp.asarray(obj)
    out = xp.argsort(x, axis=axis, stable=True, descending=True)
    assert xp.all(out == xp.asarray(expected))


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
11 Feb 2026 9.30 AM
root / root
0755
__pycache__
--
11 Feb 2026 9.30 AM
root / root
0755
__init__.py
0.275 KB
20 Jan 2026 1.01 PM
root / root
0644
test_array_object.py
16.636 KB
20 Jan 2026 1.01 PM
root / root
0644
test_creation_functions.py
4.905 KB
20 Jan 2026 1.01 PM
root / root
0644
test_data_type_functions.py
0.994 KB
20 Jan 2026 1.01 PM
root / root
0644
test_elementwise_functions.py
3.711 KB
20 Jan 2026 1.01 PM
root / root
0644
test_indexing_functions.py
0.612 KB
20 Jan 2026 1.01 PM
root / root
0644
test_manipulation_functions.py
1.062 KB
20 Jan 2026 1.01 PM
root / root
0644
test_set_functions.py
0.533 KB
20 Jan 2026 1.01 PM
root / root
0644
test_sorting_functions.py
0.588 KB
20 Jan 2026 1.01 PM
root / root
0644
test_validation.py
0.66 KB
20 Jan 2026 1.01 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF