Skip to content

Commit 221ff01

Browse files
committed
xfails
1 parent 38d4d56 commit 221ff01

5 files changed

+3
-93
lines changed

docs/supported-array-libraries.md

-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ NumPy has a few issues:
4646

4747
- `unique_*` will not compare nans as unequal.
4848
- No `from_dlpack` or `__dlpack__`.
49-
- `argmax()` and `argmin()` do not have `keepdims`.
50-
- `qr()` doesn't support matrix stacks.
5149
- Type promotion behavior will be value based for 0-D arrays (and there is no
5250
`NPY_PROMOTION_STATE=weak` to disable this).
5351

numpy-1-22-xfails.txt

+1-76
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
# attributes are np.float32 instead of float
52
# (see also https://github.com/data-apis/array-api/issues/405)
63
array_api_tests/test_data_type_functions.py::test_finfo[float32]
@@ -42,30 +39,13 @@ array_api_tests/meta/test_hypothesis_helpers.py::test_symmetric_matrices
4239
# NumPy 1.22 specific XFAILS
4340
############################
4441

45-
# dlpack stuff
46-
array_api_tests/test_has_names.py::test_has_names[creation-from_dlpack]
47-
array_api_tests/test_has_names.py::test_has_names[array_method-__dlpack__]
48-
array_api_tests/test_has_names.py::test_has_names[array_method-__dlpack_device__]
49-
array_api_tests/test_signatures.py::test_func_signature[from_dlpack]
50-
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__]
51-
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack_device__]
52-
53-
# qr() doesn't support matrix stacks
54-
array_api_tests/test_linalg.py::test_qr
55-
5642
# cross has some promotion bug that is fixed in newer numpy versions
5743
array_api_tests/test_linalg.py::test_cross
5844

5945
# vector_norm with ord=-1 which has since been fixed
6046
# https://github.com/numpy/numpy/issues/21083
6147
array_api_tests/test_linalg.py::test_vector_norm
6248

63-
# argmax and argmin do not support keepdims
64-
array_api_tests/test_searching_functions.py::test_argmax
65-
array_api_tests/test_searching_functions.py::test_argmin
66-
array_api_tests/test_signatures.py::test_func_signature[argmax]
67-
array_api_tests/test_signatures.py::test_func_signature[argmin]
68-
6949
# NumPy 1.22 doesn't support NPY_PROMOTION_STATE=weak, so many tests fail with
7050
# type promotion issues
7151
array_api_tests/test_manipulation_functions.py::test_concat
@@ -98,20 +78,11 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_copysign
9878
array_api_tests/test_operators_and_elementwise_functions.py::test_divide[__truediv__(x, s)]
9979
array_api_tests/test_operators_and_elementwise_functions.py::test_divide[__truediv__(x1, x2)]
10080
array_api_tests/test_operators_and_elementwise_functions.py::test_divide[divide(x1, x2)]
101-
array_api_tests/test_operators_and_elementwise_functions.py::test_equal[__eq__(x1, x2)]
102-
array_api_tests/test_operators_and_elementwise_functions.py::test_equal[equal(x1, x2)]
10381
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[__floordiv__(x, s)]
10482
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[__floordiv__(x1, x2)]
10583
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[__ifloordiv__(x, s)]
10684
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[floor_divide(x1, x2)]
107-
array_api_tests/test_operators_and_elementwise_functions.py::test_greater[__gt__(x1, x2)]
108-
array_api_tests/test_operators_and_elementwise_functions.py::test_greater[greater(x1, x2)]
109-
array_api_tests/test_operators_and_elementwise_functions.py::test_greater_equal[greater_equal(x1, x2)]
11085
array_api_tests/test_operators_and_elementwise_functions.py::test_hypot
111-
array_api_tests/test_operators_and_elementwise_functions.py::test_less[__lt__(x1, x2)]
112-
array_api_tests/test_operators_and_elementwise_functions.py::test_less[less(x1, x2)]
113-
array_api_tests/test_operators_and_elementwise_functions.py::test_less_equal[__le__(x1, x2)]
114-
array_api_tests/test_operators_and_elementwise_functions.py::test_less_equal[less_equal(x1, x2)]
11586
array_api_tests/test_operators_and_elementwise_functions.py::test_logaddexp
11687
array_api_tests/test_operators_and_elementwise_functions.py::test_maximum
11788
array_api_tests/test_operators_and_elementwise_functions.py::test_minimum
@@ -133,53 +104,10 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[__isu
133104
array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[__sub__(x, s)]
134105
array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[__sub__(x1, x2)]
135106
array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[subtract(x1, x2)]
136-
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i < 0 and x2_i is +0) -> -infinity]
137-
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i < 0 and x2_i is -0) -> +infinity]
138-
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i > 0 and x2_i is +0) -> +infinity]
139-
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i > 0 and x2_i is -0) -> -infinity]
140-
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is +0 and x2_i < 0) -> -0]
141-
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is +0 and x2_i > 0) -> +0]
142-
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is -0 and x2_i < 0) -> +0]
143-
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is -0 and x2_i > 0) -> -0]
144-
array_api_tests/test_special_cases.py::test_binary[__mod__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> x2_i]
145-
array_api_tests/test_special_cases.py::test_binary[__mod__(isfinite(x1_i) and x1_i < 0 and x2_i is -infinity) -> x1_i]
146-
array_api_tests/test_special_cases.py::test_binary[__mod__(isfinite(x1_i) and x1_i > 0 and x2_i is +infinity) -> x1_i]
147-
array_api_tests/test_special_cases.py::test_binary[__mod__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> x2_i]
148-
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is +0 and x2_i < 0) -> -0]
149-
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is +0 and x2_i > 0) -> +0]
150-
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is -0 and x2_i < 0) -> -0]
151-
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is -0 and x2_i > 0) -> +0]
152-
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]
153-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is +0 and x2_i < 0) -> +infinity]
154-
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is +0 and x2_i > 0) -> +0]
155-
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]
156-
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]
157-
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]
158-
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]
159-
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]
160-
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i < 0 and x2_i is +0) -> roughly -pi/2]
161-
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i < 0 and x2_i is -0) -> roughly -pi/2]
162-
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i > 0 and x2_i is +0) -> roughly +pi/2]
163-
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i > 0 and x2_i is -0) -> roughly +pi/2]
164-
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i < 0 and x2_i is +0) -> -infinity]
165-
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i < 0 and x2_i is -0) -> +infinity]
166-
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i > 0 and x2_i is +0) -> +infinity]
167-
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i > 0 and x2_i is -0) -> -infinity]
168-
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +0 and x2_i < 0) -> -0]
169-
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +0 and x2_i > 0) -> +0]
170-
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -0 and x2_i < 0) -> +0]
171-
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -0 and x2_i > 0) -> -0]
172-
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> x2_i]
173-
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i < 0 and x2_i is -infinity) -> x1_i]
174-
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i > 0 and x2_i is +infinity) -> x1_i]
175-
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> x2_i]
176-
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i is +0 and x2_i < 0) -> -0]
177-
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i is +0 and x2_i > 0) -> +0]
178-
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i is -0 and x2_i < 0) -> -0]
179-
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i is -0 and x2_i > 0) -> +0]
180107
array_api_tests/test_special_cases.py::test_iop[__iadd__(x1_i is -0 and x2_i is -0) -> -0]
181108

182109
# 2023.12 support
110+
array_api_tests/test_has_names.py::test_has_names[creation-from_dlpack]
183111
array_api_tests/test_signatures.py::test_func_signature[from_dlpack]
184112
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__]
185113
# uint64 repeats not supported
@@ -212,6 +140,3 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity
212140
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i < 0) -> +infinity]
213141
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0]
214142
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
215-
216-
# numpy < 2 bug: type promotion of asarray([], 'float32') and (np.finfo(float32).max + 1) -> float64
217-
array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real

numpy-1-26-xfails.txt

-3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,3 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity
6969
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i < 0) -> +infinity]
7070
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0]
7171
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
72-
73-
# numpy < 2 bug: type promotion of asarray([], 'float32') and (finfo(float32).max + 1) gives float64 not float32
74-
array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real

numpy-dev-xfails.txt

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
array_api_tests/test_data_type_functions.py::test_finfo[float32]
44
array_api_tests/test_data_type_functions.py::test_finfo[complex64]
55

6-
# The test suite cannot properly get the signature for vecdot
7-
# https://github.com/numpy/numpy/pull/26237
8-
array_api_tests/test_signatures.py::test_func_signature[vecdot]
9-
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.vecdot]
10-
116
# 2023.12 support
127
# uint64 repeats not supported
138
array_api_tests/test_manipulation_functions.py::test_repeat

numpy-xfails.txt

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@
33
array_api_tests/test_data_type_functions.py::test_finfo[float32]
44
array_api_tests/test_data_type_functions.py::test_finfo[complex64]
55

6-
# The test suite cannot properly get the signature for vecdot
7-
# https://github.com/numpy/numpy/pull/26237
8-
array_api_tests/test_signatures.py::test_func_signature[vecdot]
9-
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.vecdot]
10-
116
# 2023.12 support
12-
array_api_tests/test_signatures.py::test_func_signature[from_dlpack]
13-
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__]
147
# uint64 repeats not supported
158
array_api_tests/test_manipulation_functions.py::test_repeat
169

@@ -20,6 +13,8 @@ array_api_tests/test_signatures.py::test_func_signature[bitwise_left_shift]
2013
array_api_tests/test_signatures.py::test_func_signature[bitwise_or]
2114
array_api_tests/test_signatures.py::test_func_signature[bitwise_right_shift]
2215
array_api_tests/test_signatures.py::test_func_signature[bitwise_xor]
16+
17+
# Stubs have a comment: (**note**: libraries may return ``NaN`` to match Python behavior.); Apparently, NumPy does just that
2318
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +infinity and isfinite(x2_i) and x2_i > 0) -> +infinity]
2419
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +infinity and isfinite(x2_i) and x2_i < 0) -> -infinity]
2520
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -infinity and isfinite(x2_i) and x2_i > 0) -> -infinity]

0 commit comments

Comments
 (0)