@@ -61,7 +61,7 @@ def test_numba_vs_cython_rolling_methods(
61
61
expected = getattr (roll , method )(engine = "cython" , ** kwargs )
62
62
63
63
# Check the cache
64
- if method not in ("mean" , "sum" , "var" , "std" ):
64
+ if method not in ("mean" , "sum" , "var" , "std" , "max" , "min" ):
65
65
assert (
66
66
getattr (np , f"nan{ method } " ),
67
67
"Rolling_apply_single" ,
@@ -88,7 +88,7 @@ def test_numba_vs_cython_expanding_methods(
88
88
expected = getattr (expand , method )(engine = "cython" , ** kwargs )
89
89
90
90
# Check the cache
91
- if method not in ("mean" , "sum" , "var" , "std" ):
91
+ if method not in ("mean" , "sum" , "var" , "std" , "max" , "min" ):
92
92
assert (
93
93
getattr (np , f"nan{ method } " ),
94
94
"Expanding_apply_single" ,
@@ -150,15 +150,16 @@ def test_dont_cache_args(
150
150
def add (values , x ):
151
151
return np .sum (values ) + x
152
152
153
+ engine_kwargs = {"nopython" : nopython , "nogil" : nogil , "parallel" : parallel }
153
154
df = DataFrame ({"value" : [0 , 0 , 0 ]})
154
- result = getattr (df , window )(** window_kwargs ).apply (
155
- add , raw = True , engine = "numba" , args = (1 ,)
155
+ result = getattr (df , window )(method = method , ** window_kwargs ).apply (
156
+ add , raw = True , engine = "numba" , engine_kwargs = engine_kwargs , args = (1 ,)
156
157
)
157
158
expected = DataFrame ({"value" : [1.0 , 1.0 , 1.0 ]})
158
159
tm .assert_frame_equal (result , expected )
159
160
160
- result = getattr (df , window )(** window_kwargs ).apply (
161
- add , raw = True , engine = "numba" , args = (2 ,)
161
+ result = getattr (df , window )(method = method , ** window_kwargs ).apply (
162
+ add , raw = True , engine = "numba" , engine_kwargs = engine_kwargs , args = (2 ,)
162
163
)
163
164
expected = DataFrame ({"value" : [2.0 , 2.0 , 2.0 ]})
164
165
tm .assert_frame_equal (result , expected )
0 commit comments