File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -1293,6 +1293,13 @@ class TestLdexp:
12931293 @pytest .mark .parametrize ("mant_dt" , get_float_dtypes ())
12941294 @pytest .mark .parametrize ("exp_dt" , get_integer_dtypes ())
12951295 def test_basic (self , mant_dt , exp_dt ):
1296+ if (
1297+ numpy .lib .NumpyVersion (numpy .__version__ ) < "2.0.0"
1298+ and mant_dt == numpy .float32
1299+ and numpy .dtype ("l" ) != numpy .int64
1300+ ):
1301+ pytest .skip ("numpy.ldexp doesn't have a loop for the input types" )
1302+
12961303 mant = numpy .array (2.0 , dtype = mant_dt )
12971304 exp = numpy .array (3 , dtype = exp_dt )
12981305 imant , iexp = dpnp .array (mant ), dpnp .array (exp )
Original file line number Diff line number Diff line change @@ -99,8 +99,18 @@ def test_umaths(test_cases):
9999 args = get_args (args_str , sh , xp = numpy )
100100 iargs = get_args (args_str , sh , xp = dpnp )
101101
102- if umath == "reciprocal" and args [0 ].dtype in [numpy .int32 , numpy .int64 ]:
103- pytest .skip ("For integer input array, numpy.reciprocal returns zero." )
102+ if umath == "reciprocal" :
103+ if args [0 ].dtype in [numpy .int32 , numpy .int64 ]:
104+ pytest .skip (
105+ "For integer input array, numpy.reciprocal returns zero."
106+ )
107+ elif umath == "ldexp" :
108+ if (
109+ numpy .lib .NumpyVersion (numpy .__version__ ) < "2.0.0"
110+ and args [0 ].dtype == numpy .float32
111+ and numpy .dtype ("l" ) != numpy .int64
112+ ):
113+ pytest .skip ("numpy.ldexp doesn't have a loop for the input types" )
104114
105115 # original
106116 expected = getattr (numpy , umath )(* args )
You can’t perform that action at this time.
0 commit comments