8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6a92447 + f40e89d commit 8b8ac96Copy full SHA for 8b8ac96
array_api_tests/__init__.py
@@ -1,10 +1,24 @@
1
+from functools import wraps
2
+
3
+from hypothesis import strategies as st
4
from hypothesis.extra.array_api import make_strategies_namespace
5
6
from ._array_module import mod as _xp
7
8
+__all__ = ["xps"]
9
10
xps = make_strategies_namespace(_xp)
11
12
-del _xp
-del make_strategies_namespace
13
+# We monkey patch floats() to always disable subnormals as they are out-of-scope
14
15
+_floats = st.floats
16
17
18
+@wraps(_floats)
19
+def floats(*a, **kw):
20
+ kw["allow_subnormal"] = False
21
+ return _floats(*a, **kw)
22
23
24
+st.floats = floats
0 commit comments