Skip to content

Commit 03b735f

Browse files
committed
Remove COMPLEX_VER
1 parent e1d56a0 commit 03b735f

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

array_api_tests/__init__.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
from . import _version
88
from ._array_module import mod as _xp
99

10-
__all__ = ["COMPLEX_VER", "api_version", "xps"]
11-
12-
13-
COMPLEX_VER: str = "2022.12"
10+
__all__ = ["api_version", "xps"]
1411

1512

1613
# We monkey patch floats() to always disable subnormals as they are out-of-scope

array_api_tests/test_operators_and_elementwise_functions.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from hypothesis import strategies as st
1313
from hypothesis.control import reject
1414

15-
from . import COMPLEX_VER, _array_module as xp, api_version
15+
from . import _array_module as xp, api_version
1616
from . import array_helpers as ah
1717
from . import dtype_helpers as dh
1818
from . import hypothesis_helpers as hh
@@ -36,7 +36,7 @@ def boolean_and_all_integer_dtypes() -> st.SearchStrategy[DataType]:
3636

3737
def all_floating_dtypes() -> st.SearchStrategy[DataType]:
3838
strat = xps.floating_dtypes()
39-
if api_version >= COMPLEX_VER:
39+
if api_version >= "2022.12":
4040
strat |= xps.complex_dtypes()
4141
return strat
4242

@@ -502,7 +502,7 @@ def make_unary_params(
502502
) -> List[Param[UnaryParamContext]]:
503503
if hh.FILTER_UNDEFINED_DTYPES:
504504
dtypes = [d for d in dtypes if not isinstance(d, xp._UndefinedStub)]
505-
if api_version < COMPLEX_VER:
505+
if api_version < "2022.12":
506506
dtypes = [d for d in dtypes if d not in dh.complex_dtypes]
507507
dtypes_strat = st.sampled_from(dtypes)
508508
strat = xps.arrays(dtype=dtypes_strat, shape=hh.shapes())
@@ -965,7 +965,7 @@ def test_ceil(x):
965965
unary_assert_against_refimpl("ceil", x, out, math.ceil, strict_check=True)
966966

967967

968-
if api_version >= COMPLEX_VER:
968+
if api_version >= "2022.12":
969969

970970
@given(xps.arrays(dtype=xps.complex_dtypes(), shape=hh.shapes()))
971971
def test_conj(x):
@@ -1127,7 +1127,7 @@ def test_greater_equal(ctx, data):
11271127
)
11281128

11291129

1130-
if api_version >= COMPLEX_VER:
1130+
if api_version >= "2022.12":
11311131

11321132
@given(xps.arrays(dtype=xps.complex_dtypes(), shape=hh.shapes()))
11331133
def test_imag(x):
@@ -1378,7 +1378,7 @@ def test_pow(ctx, data):
13781378
# Values testing pow is too finicky
13791379

13801380

1381-
if api_version >= COMPLEX_VER:
1381+
if api_version >= "2022.12":
13821382

13831383
@given(xps.arrays(dtype=xps.complex_dtypes(), shape=hh.shapes()))
13841384
def test_real(x):

0 commit comments

Comments
 (0)