@@ -1720,17 +1720,18 @@ def test_agg_dist_like_and_nonunique_columns():
1720
1720
tm .assert_series_equal (result , expected )
1721
1721
1722
1722
1723
- def test_numba_raw_apply_with_args ():
1724
- # GH:58712
1725
- df = DataFrame ({"A" : [1 , 2 , 3 ], "B" : [4 , 5 , 6 ]})
1726
- result = df .apply (lambda x , a , b : x + a + b , args = (1 , 2 ), engine = "numba" , raw = True )
1727
- # note:
1728
- # result is always float dtype, see core._numba.executor.py:generate_apply_looper
1729
- expected = df + 3.0
1730
- tm .assert_frame_equal (result , expected )
1723
+ def test_numba_raw_apply_with_args (engine ):
1724
+ if engine == "numba" :
1725
+ # GH:58712
1726
+ df = DataFrame ({"A" : [1 , 2 , 3 ], "B" : [4 , 5 , 6 ]})
1727
+ result = df .apply (lambda x , a , b : x + a + b , args = (1 , 2 ), engine = engine , raw = True )
1728
+ # note:
1729
+ # result is always float dtype, see core._numba.executor.py:generate_apply_looper
1730
+ expected = df + 3.0
1731
+ tm .assert_frame_equal (result , expected )
1731
1732
1732
- with pytest .raises (
1733
- pd .errors .NumbaUtilError ,
1734
- match = "numba does not support kwargs with nopython=True" ,
1735
- ):
1736
- df .apply (lambda x , a , b : x + a + b , args = (1 ,), b = 2 , engine = "numba" , raw = True )
1733
+ with pytest .raises (
1734
+ pd .errors .NumbaUtilError ,
1735
+ match = "numba does not support kwargs with nopython=True" ,
1736
+ ):
1737
+ df .apply (lambda x , a , b : x + a + b , args = (1 ,), b = 2 , engine = engine , raw = True )
0 commit comments