Skip to content

Commit ea94e3b

Browse files
committed
WIP numpy XPASS cleanup
1 parent 2eafb97 commit ea94e3b

File tree

4 files changed

+0
-169
lines changed

4 files changed

+0
-169
lines changed

numpy-1-21-xfails.txt

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# asarray(copy=False) is not yet implemented
22
array_api_tests/test_creation_functions.py::test_asarray_arrays
33

4-
# https://github.com/data-apis/array-api-tests/issues/195
5-
array_api_tests/test_creation_functions.py::test_linspace
6-
74
# finfo(float32).eps returns float32 but should return float
85
array_api_tests/test_data_type_functions.py::test_finfo[float32]
96

@@ -13,12 +10,6 @@ array_api_tests/test_has_names.py::test_has_names[array_method-to_device]
1310
array_api_tests/test_has_names.py::test_has_names[array_attribute-device]
1411
array_api_tests/test_has_names.py::test_has_names[array_attribute-mT]
1512

16-
# linalg tests require https://github.com/data-apis/array-api-tests/pull/101
17-
# cleanups. Also some tests are using .mT
18-
array_api_tests/test_linalg.py::test_eigvalsh
19-
array_api_tests/test_linalg.py::test_solve
20-
array_api_tests/test_linalg.py::test_trace
21-
2213
# Array methods and attributes not already on np.ndarray cannot be wrapped
2314
array_api_tests/test_signatures.py::test_array_method_signature[__array_namespace__]
2415
array_api_tests/test_signatures.py::test_array_method_signature[to_device]
@@ -44,10 +35,6 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and
4435
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
4536

4637
# https://github.com/numpy/numpy/issues/21213
47-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
48-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
49-
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
50-
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -0 and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
5138
array_api_tests/meta/test_hypothesis_helpers.py::test_symmetric_matrices
5239

5340
# NumPy 1.21 specific XFAILS
@@ -80,72 +67,42 @@ array_api_tests/test_searching_functions.py::test_argmin
8067
array_api_tests/test_signatures.py::test_func_signature[argmax]
8168
array_api_tests/test_signatures.py::test_func_signature[argmin]
8269

83-
# unique doesn't support comparing nans as unequal
84-
array_api_tests/test_set_functions.py::test_unique_all
85-
array_api_tests/test_set_functions.py::test_unique_counts
86-
array_api_tests/test_set_functions.py::test_unique_inverse
87-
array_api_tests/test_set_functions.py::test_unique_values
88-
89-
# The test suite is incorrectly checking sums that have loss of significance
90-
# (https://github.com/data-apis/array-api-tests/issues/168)
91-
array_api_tests/test_statistical_functions.py::test_sum
92-
array_api_tests/test_statistical_functions.py::test_prod
93-
9470
# NumPy 1.21 doesn't support NPY_PROMOTION_STATE=weak, so many tests fail with
9571
# type promotion issues
9672
array_api_tests/test_manipulation_functions.py::test_concat
9773
array_api_tests/test_operators_and_elementwise_functions.py::test_add[__add__(x, s)]
98-
array_api_tests/test_operators_and_elementwise_functions.py::test_add[__add__(x1, x2)]
9974
array_api_tests/test_operators_and_elementwise_functions.py::test_add[__iadd__(x, s)]
100-
array_api_tests/test_operators_and_elementwise_functions.py::test_add[add(x1, x2)]
10175
array_api_tests/test_operators_and_elementwise_functions.py::test_atan2
10276
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_and[__and__(x, s)]
10377
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_and[__and__(x1, x2)]
10478
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_and[__iand__(x, s)]
105-
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_and[bitwise_and(x1, x2)]
10679
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_left_shift[__ilshift__(x, s)]
10780
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_left_shift[__lshift__(x, s)]
108-
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_left_shift[__lshift__(x1, x2)]
109-
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_left_shift[bitwise_left_shift(x1, x2)]
11081
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_or[__ior__(x, s)]
11182
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_or[__or__(x, s)]
11283
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_or[__or__(x1, x2)]
11384
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_or[bitwise_or(x1, x2)]
11485
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_right_shift[__irshift__(x, s)]
11586
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_right_shift[__rshift__(x, s)]
116-
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_right_shift[__rshift__(x1, x2)]
11787
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_right_shift[bitwise_right_shift(x1, x2)]
11888
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_xor[__ixor__(x, s)]
11989
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_xor[__xor__(x, s)]
120-
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_xor[__xor__(x1, x2)]
12190
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_xor[bitwise_xor(x1, x2)]
12291
array_api_tests/test_operators_and_elementwise_functions.py::test_copysign
12392
array_api_tests/test_operators_and_elementwise_functions.py::test_divide[__truediv__(x, s)]
12493
array_api_tests/test_operators_and_elementwise_functions.py::test_divide[__truediv__(x1, x2)]
12594
array_api_tests/test_operators_and_elementwise_functions.py::test_divide[divide(x1, x2)]
126-
array_api_tests/test_operators_and_elementwise_functions.py::test_equal[__eq__(x1, x2)]
127-
array_api_tests/test_operators_and_elementwise_functions.py::test_equal[equal(x1, x2)]
12895
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[__floordiv__(x, s)]
12996
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[__floordiv__(x1, x2)]
13097
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[__ifloordiv__(x, s)]
13198
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[floor_divide(x1, x2)]
132-
array_api_tests/test_operators_and_elementwise_functions.py::test_greater[__gt__(x1, x2)]
133-
array_api_tests/test_operators_and_elementwise_functions.py::test_greater[greater(x1, x2)]
134-
array_api_tests/test_operators_and_elementwise_functions.py::test_greater_equal[greater_equal(x1, x2)]
13599
array_api_tests/test_operators_and_elementwise_functions.py::test_hypot
136-
array_api_tests/test_operators_and_elementwise_functions.py::test_less[__lt__(x1, x2)]
137-
array_api_tests/test_operators_and_elementwise_functions.py::test_less[less(x1, x2)]
138-
array_api_tests/test_operators_and_elementwise_functions.py::test_less_equal[__le__(x1, x2)]
139-
array_api_tests/test_operators_and_elementwise_functions.py::test_less_equal[less_equal(x1, x2)]
140100
array_api_tests/test_operators_and_elementwise_functions.py::test_logaddexp
141-
array_api_tests/test_operators_and_elementwise_functions.py::test_maximum
142101
array_api_tests/test_operators_and_elementwise_functions.py::test_minimum
143102
array_api_tests/test_operators_and_elementwise_functions.py::test_multiply[__imul__(x, s)]
144103
array_api_tests/test_operators_and_elementwise_functions.py::test_multiply[__mul__(x, s)]
145104
array_api_tests/test_operators_and_elementwise_functions.py::test_multiply[__mul__(x1, x2)]
146105
array_api_tests/test_operators_and_elementwise_functions.py::test_multiply[multiply(x1, x2)]
147-
array_api_tests/test_operators_and_elementwise_functions.py::test_not_equal[__ne__(x1, x2)]
148-
array_api_tests/test_operators_and_elementwise_functions.py::test_not_equal[not_equal(x1, x2)]
149106
array_api_tests/test_operators_and_elementwise_functions.py::test_pow[__ipow__(x, s)]
150107
array_api_tests/test_operators_and_elementwise_functions.py::test_pow[__pow__(x, s)]
151108
array_api_tests/test_operators_and_elementwise_functions.py::test_pow[__pow__(x1, x2)]
@@ -156,11 +113,7 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mo
156113
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[remainder(x1, x2)]
157114
array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[__isub__(x, s)]
158115
array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[__sub__(x, s)]
159-
array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[__sub__(x1, x2)]
160116
array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[subtract(x1, x2)]
161-
array_api_tests/test_searching_functions.py::test_where
162-
array_api_tests/test_special_cases.py::test_binary[__add__((x1_i is +0 or x1_i == -0) and isfinite(x2_i) and x2_i != 0) -> x2_i]
163-
array_api_tests/test_special_cases.py::test_binary[__add__(isfinite(x1_i) and x1_i != 0 and (x2_i is +0 or x2_i == -0)) -> x1_i]
164117
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i < 0 and x2_i is +0) -> -infinity]
165118
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i < 0 and x2_i is -0) -> +infinity]
166119
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i > 0 and x2_i is +0) -> +infinity]
@@ -177,44 +130,18 @@ array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is +0 and x2_i <
177130
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is +0 and x2_i > 0) -> +0]
178131
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is -0 and x2_i < 0) -> -0]
179132
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is -0 and x2_i > 0) -> +0]
180-
array_api_tests/test_special_cases.py::test_binary[__pow__(abs(x1_i) < 1 and x2_i is +infinity) -> +0]
181-
array_api_tests/test_special_cases.py::test_binary[__pow__(abs(x1_i) < 1 and x2_i is -infinity) -> +infinity]
182-
array_api_tests/test_special_cases.py::test_binary[__pow__(abs(x1_i) > 1 and x2_i is +infinity) -> +infinity]
183-
array_api_tests/test_special_cases.py::test_binary[__pow__(abs(x1_i) > 1 and x2_i is -infinity) -> +0]
184133
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i < 0 and isfinite(x1_i) and isfinite(x2_i) and not x2_i.is_integer()) -> NaN]
185134
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is +0 and x2_i < 0) -> +infinity]
186135
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is +0 and x2_i > 0) -> +0]
187-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is +infinity and x2_i < 0) -> +0]
188-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is +infinity and x2_i > 0) -> +infinity]
189136
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
190137
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -infinity]
191138
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
192139
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -infinity and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
193140
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -infinity and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
194-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -infinity and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -infinity]
195-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is NaN and not x2_i == 0) -> NaN]
196-
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i < 0 and x2_i is +0) -> -infinity]
197-
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i < 0 and x2_i is -0) -> +infinity]
198-
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i > 0 and x2_i is +0) -> +infinity]
199-
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i > 0 and x2_i is -0) -> -infinity]
200-
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i is +0 and x2_i < 0) -> -0]
201-
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i is +0 and x2_i > 0) -> +0]
202-
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i is -0 and x2_i < 0) -> +0]
203-
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i is -0 and x2_i > 0) -> -0]
204-
array_api_tests/test_special_cases.py::test_binary[add((x1_i is +0 or x1_i == -0) and isfinite(x2_i) and x2_i != 0) -> x2_i]
205-
array_api_tests/test_special_cases.py::test_binary[add(isfinite(x1_i) and x1_i != 0 and (x2_i is +0 or x2_i == -0)) -> x1_i]
206141
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i < 0 and x2_i is +0) -> roughly -pi/2]
207142
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i < 0 and x2_i is -0) -> roughly -pi/2]
208143
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i > 0 and x2_i is +0) -> roughly +pi/2]
209144
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i > 0 and x2_i is -0) -> roughly +pi/2]
210-
array_api_tests/test_special_cases.py::test_binary[divide(x1_i < 0 and x2_i is +0) -> -infinity]
211-
array_api_tests/test_special_cases.py::test_binary[divide(x1_i < 0 and x2_i is -0) -> +infinity]
212-
array_api_tests/test_special_cases.py::test_binary[divide(x1_i > 0 and x2_i is +0) -> +infinity]
213-
array_api_tests/test_special_cases.py::test_binary[divide(x1_i > 0 and x2_i is -0) -> -infinity]
214-
array_api_tests/test_special_cases.py::test_binary[divide(x1_i is +0 and x2_i < 0) -> -0]
215-
array_api_tests/test_special_cases.py::test_binary[divide(x1_i is +0 and x2_i > 0) -> +0]
216-
array_api_tests/test_special_cases.py::test_binary[divide(x1_i is -0 and x2_i < 0) -> +0]
217-
array_api_tests/test_special_cases.py::test_binary[divide(x1_i is -0 and x2_i > 0) -> -0]
218145
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i < 0 and x2_i is +0) -> -infinity]
219146
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i < 0 and x2_i is -0) -> +infinity]
220147
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i > 0 and x2_i is +0) -> +infinity]
@@ -223,24 +150,6 @@ array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +0 and x
223150
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +0 and x2_i > 0) -> +0]
224151
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -0 and x2_i < 0) -> +0]
225152
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -0 and x2_i > 0) -> -0]
226-
array_api_tests/test_special_cases.py::test_binary[pow(abs(x1_i) < 1 and x2_i is +infinity) -> +0]
227-
array_api_tests/test_special_cases.py::test_binary[pow(abs(x1_i) < 1 and x2_i is -infinity) -> +infinity]
228-
array_api_tests/test_special_cases.py::test_binary[pow(abs(x1_i) > 1 and x2_i is +infinity) -> +infinity]
229-
array_api_tests/test_special_cases.py::test_binary[pow(abs(x1_i) > 1 and x2_i is -infinity) -> +0]
230-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i < 0 and isfinite(x1_i) and isfinite(x2_i) and not x2_i.is_integer()) -> NaN]
231-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is +0 and x2_i < 0) -> +infinity]
232-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is +0 and x2_i > 0) -> +0]
233-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is +infinity and x2_i < 0) -> +0]
234-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is +infinity and x2_i > 0) -> +infinity]
235-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -0 and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
236-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -0 and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -infinity]
237-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -0 and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
238-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -0 and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
239-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -infinity and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
240-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -infinity and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
241-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
242-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -infinity and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -infinity]
243-
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is NaN and not x2_i == 0) -> NaN]
244153
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> x2_i]
245154
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i < 0 and x2_i is -infinity) -> x1_i]
246155
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i > 0 and x2_i is +infinity) -> x1_i]
@@ -252,7 +161,6 @@ array_api_tests/test_special_cases.py::test_binary[remainder(x1_i is -0 and x2_i
252161
array_api_tests/test_special_cases.py::test_iop[__iadd__(x1_i is -0 and x2_i is -0) -> -0]
253162

254163
# 2023.12 support
255-
array_api_tests/test_searching_functions.py::test_searchsorted
256164
array_api_tests/test_signatures.py::test_func_signature[from_dlpack]
257165
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__]
258166
# uint64 repeats not supported

numpy-1-26-xfails.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# asarray(copy=False) is not yet implemented
2-
array_api_tests/test_creation_functions.py::test_asarray_arrays
3-
41
# finfo(float32).eps returns float32 but should return float
52
array_api_tests/test_data_type_functions.py::test_finfo[float32]
63

@@ -35,19 +32,9 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and
3532
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
3633

3734
# https://github.com/numpy/numpy/issues/21213
38-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
39-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
40-
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
41-
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -0 and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
4235
array_api_tests/meta/test_hypothesis_helpers.py::test_symmetric_matrices
4336

44-
# The test suite is incorrectly checking sums that have loss of significance
45-
# (https://github.com/data-apis/array-api-tests/issues/168)
46-
array_api_tests/test_statistical_functions.py::test_sum
47-
array_api_tests/test_statistical_functions.py::test_prod
48-
4937
# 2023.12 support
50-
array_api_tests/test_searching_functions.py::test_searchsorted
5138
array_api_tests/test_signatures.py::test_func_signature[from_dlpack]
5239
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__]
5340
# uint64 repeats not supported

0 commit comments

Comments
 (0)