Skip to content

Commit 27e4f44

Browse files
committed
Smoke remaining functions
1 parent 8dd7e78 commit 27e4f44

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

array_api_tests/test_set_functions.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from hypothesis import given
2+
3+
from . import _array_module as xp
4+
from . import hypothesis_helpers as hh
5+
from . import xps
6+
7+
8+
@given(xps.arrays(dtype=xps.scalar_dtypes(), shape=hh.shapes()))
9+
def test_unique_all(x):
10+
xp.unique_all(x)
11+
# TODO
12+
13+
14+
@given(xps.arrays(dtype=xps.scalar_dtypes(), shape=hh.shapes()))
15+
def test_unique_counts(x):
16+
xp.unique_counts(x)
17+
# TODO
18+
19+
20+
@given(xps.arrays(dtype=xps.scalar_dtypes(), shape=hh.shapes()))
21+
def test_unique_inverse(x):
22+
xp.unique_inverse(x)
23+
# TODO
24+
25+
26+
@given(xps.arrays(dtype=xps.scalar_dtypes(), shape=hh.shapes()))
27+
def test_unique_values(x):
28+
xp.unique_values(x)
29+
# TODO

array_api_tests/test_sorting.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from hypothesis import given
2+
3+
from . import _array_module as xp
4+
from . import hypothesis_helpers as hh
5+
from . import xps
6+
7+
8+
# TODO: generate kwargs
9+
@given(xps.arrays(dtype=xps.scalar_dtypes(), shape=hh.shapes()))
10+
def test_argsort(x):
11+
xp.argsort(x)
12+
# TODO
13+
14+
15+
# TODO: generate 0d arrays, generate kwargs
16+
@given(xps.arrays(dtype=xps.scalar_dtypes(), shape=hh.shapes(min_dims=1)))
17+
def test_sort(x):
18+
xp.sort(x)
19+
# TODO
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from hypothesis import given
2+
3+
from . import _array_module as xp
4+
from . import hypothesis_helpers as hh
5+
from . import xps
6+
7+
8+
# TODO: generate kwargs
9+
@given(xps.arrays(dtype=xps.scalar_dtypes(), shape=hh.shapes()))
10+
def test_any(x):
11+
xp.any(x)
12+
# TODO
13+
14+
15+
# TODO: generate kwargs
16+
@given(xps.arrays(dtype=xps.scalar_dtypes(), shape=hh.shapes()))
17+
def test_all(x):
18+
xp.all(x)
19+
# TODO

0 commit comments

Comments
 (0)