12
12
from hypothesis import strategies as st
13
13
from hypothesis .control import reject
14
14
15
- from . import COMPLEX_VER , _array_module as xp , api_version
15
+ from . import _array_module as xp , api_version
16
16
from . import array_helpers as ah
17
17
from . import dtype_helpers as dh
18
18
from . import hypothesis_helpers as hh
@@ -36,7 +36,7 @@ def boolean_and_all_integer_dtypes() -> st.SearchStrategy[DataType]:
36
36
37
37
def all_floating_dtypes () -> st .SearchStrategy [DataType ]:
38
38
strat = xps .floating_dtypes ()
39
- if api_version >= COMPLEX_VER :
39
+ if api_version >= "2022.12" :
40
40
strat |= xps .complex_dtypes ()
41
41
return strat
42
42
@@ -502,7 +502,7 @@ def make_unary_params(
502
502
) -> List [Param [UnaryParamContext ]]:
503
503
if hh .FILTER_UNDEFINED_DTYPES :
504
504
dtypes = [d for d in dtypes if not isinstance (d , xp ._UndefinedStub )]
505
- if api_version < COMPLEX_VER :
505
+ if api_version < "2022.12" :
506
506
dtypes = [d for d in dtypes if d not in dh .complex_dtypes ]
507
507
dtypes_strat = st .sampled_from (dtypes )
508
508
strat = xps .arrays (dtype = dtypes_strat , shape = hh .shapes ())
@@ -965,7 +965,7 @@ def test_ceil(x):
965
965
unary_assert_against_refimpl ("ceil" , x , out , math .ceil , strict_check = True )
966
966
967
967
968
- if api_version >= COMPLEX_VER :
968
+ if api_version >= "2022.12" :
969
969
970
970
@given (xps .arrays (dtype = xps .complex_dtypes (), shape = hh .shapes ()))
971
971
def test_conj (x ):
@@ -1127,7 +1127,7 @@ def test_greater_equal(ctx, data):
1127
1127
)
1128
1128
1129
1129
1130
- if api_version >= COMPLEX_VER :
1130
+ if api_version >= "2022.12" :
1131
1131
1132
1132
@given (xps .arrays (dtype = xps .complex_dtypes (), shape = hh .shapes ()))
1133
1133
def test_imag (x ):
@@ -1378,7 +1378,7 @@ def test_pow(ctx, data):
1378
1378
# Values testing pow is too finicky
1379
1379
1380
1380
1381
- if api_version >= COMPLEX_VER :
1381
+ if api_version >= "2022.12" :
1382
1382
1383
1383
@given (xps .arrays (dtype = xps .complex_dtypes (), shape = hh .shapes ()))
1384
1384
def test_real (x ):
0 commit comments