Skip to content

Commit e3a0722

Browse files
authored
Merge pull request #158 from honno/filter-undefined-kw-dtypes
Fix undefined dtypes being passed in kwargs of stat tests
2 parents 7e48141 + b3c9201 commit e3a0722

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

array_api_tests/test_statistical_functions.py

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
def kwarg_dtypes(dtype: DataType) -> st.SearchStrategy[Optional[DataType]]:
2222
dtypes = [d2 for d1, d2 in dh.promotion_table if d1 == dtype]
23+
if hh.FILTER_UNDEFINED_DTYPES:
24+
dtypes = [d for d in dtypes if not isinstance(d, _UndefinedStub)]
2325
return st.none() | st.sampled_from(dtypes)
2426

2527

0 commit comments

Comments
 (0)