XYZ File Manager
Current Path:
/opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/array_api/tests
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
numpy
/
array_api
/
tests
/
📁
..
📄
__init__.py
(282 B)
📁
__pycache__
📄
test_array_object.py
(16.64 KB)
📄
test_creation_functions.py
(4.91 KB)
📄
test_data_type_functions.py
(1018 B)
📄
test_elementwise_functions.py
(3.71 KB)
📄
test_indexing_functions.py
(627 B)
📄
test_manipulation_functions.py
(1.06 KB)
📄
test_set_functions.py
(546 B)
📄
test_sorting_functions.py
(602 B)
📄
test_validation.py
(676 B)
Editing: test_set_functions.py
import pytest from hypothesis import given from hypothesis.extra.array_api import make_strategies_namespace from numpy import array_api as xp xps = make_strategies_namespace(xp) @pytest.mark.parametrize("func", [xp.unique_all, xp.unique_inverse]) @given(xps.arrays(dtype=xps.scalar_dtypes(), shape=xps.array_shapes())) def test_inverse_indices_shape(func, x): """ Inverse indices share shape of input array See https://github.com/numpy/numpy/issues/20638 """ out = func(x) assert out.inverse_indices.shape == x.shape
Upload File
Create Folder