@@ -781,6 +781,7 @@ def test_acosh(x):
781
781
)
782
782
783
783
784
+ @pytest .mark .has_setup_funcs
784
785
@pytest .mark .parametrize ("ctx," , make_binary_params ("add" , dh .numeric_dtypes ))
785
786
@given (data = st .data ())
786
787
def test_add (ctx , data ):
@@ -854,6 +855,7 @@ def test_atanh(x):
854
855
)
855
856
856
857
858
+ @pytest .mark .has_setup_funcs
857
859
@pytest .mark .parametrize (
858
860
"ctx" , make_binary_params ("bitwise_and" , dh .bool_and_all_int_dtypes )
859
861
)
@@ -873,6 +875,7 @@ def test_bitwise_and(ctx, data):
873
875
binary_param_assert_against_refimpl (ctx , left , right , res , "&" , refimpl )
874
876
875
877
878
+ @pytest .mark .has_setup_funcs
876
879
@pytest .mark .parametrize (
877
880
"ctx" , make_binary_params ("bitwise_left_shift" , dh .all_int_dtypes )
878
881
)
@@ -895,6 +898,7 @@ def test_bitwise_left_shift(ctx, data):
895
898
)
896
899
897
900
901
+ @pytest .mark .has_setup_funcs
898
902
@pytest .mark .parametrize (
899
903
"ctx" , make_unary_params ("bitwise_invert" , dh .bool_and_all_int_dtypes )
900
904
)
@@ -913,6 +917,7 @@ def test_bitwise_invert(ctx, data):
913
917
unary_assert_against_refimpl (ctx .func_name , x , out , refimpl , expr_template = "~{}={}" )
914
918
915
919
920
+ @pytest .mark .has_setup_funcs
916
921
@pytest .mark .parametrize (
917
922
"ctx" , make_binary_params ("bitwise_or" , dh .bool_and_all_int_dtypes )
918
923
)
@@ -932,6 +937,7 @@ def test_bitwise_or(ctx, data):
932
937
binary_param_assert_against_refimpl (ctx , left , right , res , "|" , refimpl )
933
938
934
939
940
+ @pytest .mark .has_setup_funcs
935
941
@pytest .mark .parametrize (
936
942
"ctx" , make_binary_params ("bitwise_right_shift" , dh .all_int_dtypes )
937
943
)
@@ -953,6 +959,7 @@ def test_bitwise_right_shift(ctx, data):
953
959
)
954
960
955
961
962
+ @pytest .mark .has_setup_funcs
956
963
@pytest .mark .parametrize (
957
964
"ctx" , make_binary_params ("bitwise_xor" , dh .bool_and_all_int_dtypes )
958
965
)
@@ -981,6 +988,7 @@ def test_ceil(x):
981
988
982
989
983
990
@pytest .mark .min_version ("2023.12" )
991
+ @pytest .mark .has_setup_funcs
984
992
@given (x = hh .arrays (dtype = hh .real_dtypes , shape = hh .shapes ()), data = st .data ())
985
993
def test_clip (x , data ):
986
994
# Ensure that if both min and max are arrays that all three of x, min, max
@@ -1145,6 +1153,7 @@ def test_cosh(x):
1145
1153
unary_assert_against_refimpl ("cosh" , x , out , refimpl )
1146
1154
1147
1155
1156
+ @pytest .mark .has_setup_funcs
1148
1157
@pytest .mark .parametrize ("ctx" , make_binary_params ("divide" , dh .all_float_dtypes ))
1149
1158
@given (data = st .data ())
1150
1159
def test_divide (ctx , data ):
@@ -1168,6 +1177,7 @@ def test_divide(ctx, data):
1168
1177
)
1169
1178
1170
1179
1180
+ @pytest .mark .has_setup_funcs
1171
1181
@pytest .mark .parametrize ("ctx" , make_binary_params ("equal" , dh .all_dtypes ))
1172
1182
@given (data = st .data ())
1173
1183
def test_equal (ctx , data ):
@@ -1242,6 +1252,7 @@ def refimpl(z):
1242
1252
unary_assert_against_refimpl ("floor" , x , out , refimpl , strict_check = True )
1243
1253
1244
1254
1255
+ @pytest .mark .has_setup_funcs
1245
1256
@pytest .mark .parametrize ("ctx" , make_binary_params ("floor_divide" , dh .real_dtypes ))
1246
1257
@given (data = st .data ())
1247
1258
def test_floor_divide (ctx , data ):
@@ -1261,6 +1272,7 @@ def test_floor_divide(ctx, data):
1261
1272
binary_param_assert_against_refimpl (ctx , left , right , res , "//" , operator .floordiv )
1262
1273
1263
1274
1275
+ @pytest .mark .has_setup_funcs
1264
1276
@pytest .mark .parametrize ("ctx" , make_binary_params ("greater" , dh .real_dtypes ))
1265
1277
@given (data = st .data ())
1266
1278
def test_greater (ctx , data ):
@@ -1281,6 +1293,7 @@ def test_greater(ctx, data):
1281
1293
)
1282
1294
1283
1295
1296
+ @pytest .mark .has_setup_funcs
1284
1297
@pytest .mark .parametrize ("ctx" , make_binary_params ("greater_equal" , dh .real_dtypes ))
1285
1298
@given (data = st .data ())
1286
1299
def test_greater_equal (ctx , data ):
@@ -1352,6 +1365,7 @@ def test_isnan(x):
1352
1365
unary_assert_against_refimpl ("isnan" , x , out , refimpl , res_stype = bool )
1353
1366
1354
1367
1368
+ @pytest .mark .has_setup_funcs
1355
1369
@pytest .mark .parametrize ("ctx" , make_binary_params ("less" , dh .real_dtypes ))
1356
1370
@given (data = st .data ())
1357
1371
def test_less (ctx , data ):
@@ -1372,6 +1386,7 @@ def test_less(ctx, data):
1372
1386
)
1373
1387
1374
1388
1389
+ @pytest .mark .has_setup_funcs
1375
1390
@pytest .mark .parametrize ("ctx" , make_binary_params ("less_equal" , dh .real_dtypes ))
1376
1391
@given (data = st .data ())
1377
1392
def test_less_equal (ctx , data ):
@@ -1463,6 +1478,7 @@ def logaddexp_refimpl(l: float, r: float) -> float:
1463
1478
1464
1479
1465
1480
@pytest .mark .min_version ("2023.12" )
1481
+ @pytest .mark .has_setup_funcs
1466
1482
@given (* hh .two_mutual_arrays (dh .real_float_dtypes ))
1467
1483
def test_logaddexp (x1 , x2 ):
1468
1484
out = xp .logaddexp (x1 , x2 )
@@ -1476,6 +1492,7 @@ def test_logaddexp(x1, x2):
1476
1492
)
1477
1493
1478
1494
1495
+ @pytest .mark .has_setup_funcs
1479
1496
@given (hh .arrays (dtype = xp .bool , shape = hh .shapes ()))
1480
1497
def test_logical_not (x ):
1481
1498
out = xp .logical_not (x )
@@ -1486,6 +1503,7 @@ def test_logical_not(x):
1486
1503
)
1487
1504
1488
1505
1506
+ @pytest .mark .has_setup_funcs
1489
1507
@given (* hh .two_mutual_arrays ([xp .bool ]))
1490
1508
def test_logical_and (x1 , x2 ):
1491
1509
out = xp .logical_and (x1 , x2 )
@@ -1500,6 +1518,7 @@ def test_logical_and(x1, x2):
1500
1518
)
1501
1519
1502
1520
1521
+ @pytest .mark .has_setup_funcs
1503
1522
@given (* hh .two_mutual_arrays ([xp .bool ]))
1504
1523
def test_logical_or (x1 , x2 ):
1505
1524
out = xp .logical_or (x1 , x2 )
@@ -1514,6 +1533,7 @@ def test_logical_or(x1, x2):
1514
1533
)
1515
1534
1516
1535
1536
+ @pytest .mark .has_setup_funcs
1517
1537
@given (* hh .two_mutual_arrays ([xp .bool ]))
1518
1538
def test_logical_xor (x1 , x2 ):
1519
1539
out = xp .logical_xor (x1 , x2 )
@@ -1546,6 +1566,7 @@ def test_minimum(x1, x2):
1546
1566
)
1547
1567
1548
1568
1569
+ @pytest .mark .has_setup_funcs
1549
1570
@pytest .mark .parametrize ("ctx" , make_binary_params ("multiply" , dh .numeric_dtypes ))
1550
1571
@given (data = st .data ())
1551
1572
def test_multiply (ctx , data ):
@@ -1577,6 +1598,7 @@ def test_negative(ctx, data):
1577
1598
)
1578
1599
1579
1600
1601
+ @pytest .mark .has_setup_funcs
1580
1602
@pytest .mark .parametrize ("ctx" , make_binary_params ("not_equal" , dh .all_dtypes ))
1581
1603
@given (data = st .data ())
1582
1604
def test_not_equal (ctx , data ):
@@ -1598,6 +1620,7 @@ def test_not_equal(ctx, data):
1598
1620
1599
1621
1600
1622
@pytest .mark .min_version ("2024.12" )
1623
+ @pytest .mark .has_setup_funcs
1601
1624
@given (
1602
1625
shapes = hh .two_mutually_broadcastable_shapes ,
1603
1626
dtype = hh .real_floating_dtypes ,
@@ -1617,6 +1640,8 @@ def test_nextafter(shapes, dtype, data):
1617
1640
out = out
1618
1641
)
1619
1642
1643
+
1644
+ @pytest .mark .has_setup_funcs
1620
1645
@pytest .mark .parametrize ("ctx" , make_unary_params ("positive" , dh .numeric_dtypes ))
1621
1646
@given (data = st .data ())
1622
1647
def test_positive (ctx , data ):
@@ -1629,6 +1654,7 @@ def test_positive(ctx, data):
1629
1654
ph .assert_array_elements (ctx .func_name , out = out , expected = x )
1630
1655
1631
1656
1657
+ @pytest .mark .has_setup_funcs
1632
1658
@pytest .mark .parametrize ("ctx" , make_binary_params ("pow" , dh .numeric_dtypes ))
1633
1659
@given (data = st .data ())
1634
1660
def test_pow (ctx , data ):
@@ -1676,6 +1702,7 @@ def test_reciprocal(x):
1676
1702
1677
1703
1678
1704
@pytest .mark .skip (reason = "flaky" )
1705
+ @pytest .mark .has_setup_funcs
1679
1706
@pytest .mark .parametrize ("ctx" , make_binary_params ("remainder" , dh .real_dtypes ))
1680
1707
@given (data = st .data ())
1681
1708
def test_remainder (ctx , data ):
@@ -1770,6 +1797,7 @@ def test_sqrt(x):
1770
1797
)
1771
1798
1772
1799
1800
+ @pytest .mark .has_setup_funcs
1773
1801
@pytest .mark .parametrize ("ctx" , make_binary_params ("subtract" , dh .numeric_dtypes ))
1774
1802
@given (data = st .data ())
1775
1803
def test_subtract (ctx , data ):
@@ -1923,6 +1951,7 @@ def test_binary_with_scalars_bitwise_shifts(func_data, x1x2):
1923
1951
1924
1952
1925
1953
@pytest .mark .min_version ("2024.12" )
1954
+ @pytest .mark .has_setup_funcs
1926
1955
@pytest .mark .unvectorized
1927
1956
@given (
1928
1957
x1x2 = hh .array_and_py_scalar ([xp .int32 ]),
0 commit comments