Skip to content

Test everything #48

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 60 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5a1a19f
Move manipulation tests to their own file
honno Nov 9, 2021
6dd7f3d
Minor `test_concat` improvements
honno Nov 9, 2021
e5bb974
Smoke all manipulation methods
honno Nov 9, 2021
41a0292
Smoke statistical functions
honno Nov 9, 2021
97997ee
Smoke searching functions
honno Nov 9, 2021
3efff6c
Smoke remaining functions
honno Nov 10, 2021
08b2391
Test `expand_dims()`
honno Nov 10, 2021
40a74bf
Test `flip()` when `axis=None`
honno Nov 10, 2021
d05a612
Test `permute_dims()`
honno Nov 10, 2021
a9f9237
Test `reshape()`
honno Nov 10, 2021
3ac57ef
Test `roll()`
honno Nov 10, 2021
258b75e
Test `squeeze()`
honno Nov 10, 2021
1bdf6e4
Refactor assertions using ndindex
honno Nov 10, 2021
f1cc3ea
Fix `test_roll`
honno Nov 11, 2021
36679c4
Test `concat()`
honno Nov 11, 2021
a8fb70d
Test `stack()`
honno Nov 11, 2021
cf76888
Manipulation tests clean up
honno Nov 11, 2021
30a0721
Improve `min()`/`max()` tests
honno Nov 11, 2021
50a63b2
Test `mean()`
honno Nov 12, 2021
1ff7271
Test `prod()`
honno Nov 12, 2021
f426f88
Refactor axes strategies for stat functions
honno Nov 12, 2021
1238e75
Test `std()`
honno Nov 12, 2021
d1eece1
Test axes results
honno Nov 15, 2021
687e40a
Test `var()` and `sum()`
honno Nov 15, 2021
d38eee2
Generate all valid dtypes in `test_prod` and `test_sum`
honno Nov 15, 2021
704e47b
Cover axis in `test_concat`
honno Nov 16, 2021
40167c3
Cover axis in `test_flip`
honno Nov 16, 2021
2decdf0
Cover elements in `test_permute_dims`
honno Nov 16, 2021
80c4e31
Fix `test_concat` axes iteration
honno Dec 6, 2021
767bd3f
Cover all shift/axes scenarios in `test_roll`
honno Dec 6, 2021
aa7aaa0
Cover all axis scenarios in `test_stack`
honno Dec 7, 2021
b32fff0
Make float assertions more lenient in statistical tests
honno Dec 7, 2021
5978fda
Update sum and prod tests to use new default uint
honno Dec 7, 2021
9f3a83e
Sort statistical tests by spec order
honno Dec 8, 2021
09aa26b
Check error raising in `test_squeeze`, use negative axes
honno Dec 8, 2021
18709f6
Cover invalid axis in `test_expand_dims`
honno Dec 8, 2021
2ad6ddc
Try to ignore overflow scenarios in `prod` and `sum` tests
honno Dec 8, 2021
6e4564b
Docstrings for axes helpers
honno Dec 8, 2021
0326aa3
Remove redundant calls to `dh.get_scalar_type()`
honno Dec 8, 2021
cd8f117
Fix `test_manipulation_functions.assert_equals`
honno Dec 10, 2021
af285de
Skip `test_roll` as its wrong
honno Dec 10, 2021
83a6f5e
Cover everything for `argmin` and `argmax` tests
honno Dec 10, 2021
c8f4007
Cover everything for `test_nonzero`
honno Dec 10, 2021
d6c4fc6
Cover everything for `test_where`
honno Dec 10, 2021
f108941
Cover most things in `test_sort`
honno Dec 10, 2021
5b44997
Fix `test_sort` using wrong axis iteration
honno Dec 13, 2021
c0a47fd
Cover most things for `test_argsort`
honno Dec 13, 2021
d594ff5
Cover everything in `test_unique_values()`
honno Dec 13, 2021
f8c99d5
Cover everything in `test_unique_counts`
honno Dec 13, 2021
ab8674f
Cover everything in `test_unique_inverse`
honno Dec 14, 2021
131dd31
Cover everything in `test_unique_all` (if messily)
honno Dec 14, 2021
8267a7c
Cover everything in `test_all`
honno Dec 16, 2021
3fc57be
Cover everything in `test_any`
honno Dec 16, 2021
a435e63
Test 0d arrays conversion to scalars
honno Dec 16, 2021
dcc4adf
Move `axes()` strategy to `hypothesis_helpers.py`
honno Dec 16, 2021
6194b08
Remove faulty assertion in `test_two_mutual_arrays`
honno Dec 16, 2021
1273270
Move shape-related helpers into `shape_helpers.py`
honno Dec 16, 2021
a5fd48f
Move assertion helpers to `pytest_helpers.py`
honno Dec 16, 2021
4ad9e94
Fix `test_roll` with bespoke axis iterator
honno Dec 17, 2021
318b8dd
Rename file
honno Dec 21, 2021
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
14 changes: 1 addition & 13 deletions array_api_tests/array_helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import itertools

from ._array_module import (isnan, all, any, equal, not_equal, logical_and,
logical_or, isfinite, greater, less, less_equal,
zeros, ones, full, bool, int8, int16, int32,
Expand All @@ -23,7 +21,7 @@
'assert_isinf', 'positive_mathematical_sign',
'assert_positive_mathematical_sign', 'negative_mathematical_sign',
'assert_negative_mathematical_sign', 'same_sign',
'assert_same_sign', 'ndindex', 'float64',
'assert_same_sign', 'float64',
'asarray', 'full', 'true', 'false', 'isnan']

def zero(shape, dtype):
Expand Down Expand Up @@ -319,13 +317,3 @@ def int_to_dtype(x, n, signed):
if x & highest_bit:
x = -((~x & mask) + 1)
return x

def ndindex(shape):
"""
Iterator of n-D indices to an array

Yields tuples of integers to index every element of an array of shape
`shape`. Same as np.ndindex().

"""
return itertools.product(*[range(i) for i in shape])
Loading