@@ -194,7 +194,9 @@ def map(
194194 """
195195 Elementwise map for the Numba engine. Currently not supported.
196196 """
197- raise NotImplementedError ("The Numba engine is not implemented for the map method yet." )
197+ raise NotImplementedError (
198+ "The Numba engine is not implemented for the map method yet."
199+ )
198200
199201 @staticmethod
200202 def apply (
@@ -222,9 +224,8 @@ def apply(
222224 if data .empty :
223225 return data .copy () # mimic apply_empty_result()
224226 NumbaExecutionEngine .validate_values_for_numba_raw_false (
225- data ,
226- decorator if isinstance (decorator , dict ) else {}
227- )
227+ data , decorator if isinstance (decorator , dict ) else {}
228+ )
228229
229230 return NumbaExecutionEngine .apply_raw_false (
230231 data , func , args , kwargs , decorator , axis
@@ -298,7 +299,9 @@ def apply_raw_false(
298299 return DataFrame () if isinstance (data , DataFrame ) else Series ()
299300
300301 @staticmethod
301- def validate_values_for_numba_raw_false (data : Series | DataFrame , engine_kwargs : dict [str , bool ]) -> None :
302+ def validate_values_for_numba_raw_false (
303+ data : Series | DataFrame , engine_kwargs : dict [str , bool ]
304+ ) -> None :
302305 from pandas import Series
303306
304307 if engine_kwargs .get ("parallel" , False ):
@@ -344,7 +347,7 @@ def generate_numba_apply_func(
344347
345348 jitted_udf = numba .extending .register_jitable (func )
346349
347- @decorator # type: ignore
350+ @decorator
348351 def numba_func (values , col_names_index , index , * args ):
349352 results = {}
350353 for i in range (values .shape [1 - axis ]):
@@ -368,16 +371,12 @@ def numba_func(values, col_names_index, index, *args):
368371 return numba_func
369372
370373 @staticmethod
371- def apply_with_numba (
372- data , func , args , kwargs , decorator , axis = 0
373- ) -> dict [int , Any ]:
374+ def apply_with_numba (data , func , args , kwargs , decorator , axis = 0 ) -> dict [int , Any ]:
374375 func = cast (Callable , func )
375376 args , kwargs = prepare_function_arguments (
376377 func , args , kwargs , num_required_args = 1
377378 )
378- nb_func = NumbaExecutionEngine .generate_numba_apply_func (
379- func , axis , decorator
380- )
379+ nb_func = NumbaExecutionEngine .generate_numba_apply_func (func , axis , decorator )
381380
382381 from pandas .core ._numba .extensions import set_numba_data
383382
0 commit comments