(ty)
return _hpat_pandas_rolling_init
Generate rolling initializer based on data type
Generate rolling initializer based on data type
Generate rolling initializer based on data type
def gen_hpat_pandas_rolling_init(ty):
    """Generate rolling initializer based on data type"""
    def _hpat_pandas_rolling_init(typingctx, self, window, min_periods=None,
                                  center=False, win_type=None,
                                  on=None, axis=0, closed=None):
        """Internal Numba required function to register RollingType."""
        ret_typ = ty(self, win_type, on, closed)
        sig = signature(ret_typ, self, window, min_periods,
                        center, win_type, on, axis, closed)

        def _codegen(context, builder, sig, args):
            """Create DataFrameRollingTypeModel structure."""
            data, window, min_periods, center, win_type, on, axis, closed = args
            rolling = cgutils.create_struct_proxy(sig.return_type)(context, builder)
            rolling.data = data
            rolling.window = window
            rolling.min_periods = min_periods
            rolling.center = center
            rolling.win_type = win_type
            rolling.on = on
            rolling.axis = axis
            rolling.closed = closed

            if context.enable_nrt:
                context.nrt.incref(builder, self, rolling.data)

            return rolling._getvalue()

        return sig, _codegen

    return _hpat_pandas_rolling_init
def gen_hpat_pandas_rolling_init ( ty ) : def _hpat_pandas_rolling_init ( typingctx , self , window , min_periods = None , center = False , win_type = None , on = None , axis = 0 , closed = None ) : """Internal Numba required function to register RollingType.""" ret_typ = ty ( self , win_type , on , closed ) sig = signature ( ret_typ , self , window , min_periods , center , win_type , on , axis , closed ) def _codegen ( context , builder , sig , args ) : """Create DataFrameRollingTypeModel structure.""" data , window , min_periods , center , win_type , on , axis , closed = args rolling = cgutils . create_struct_proxy ( sig . return_type ) ( context , builder ) rolling . data = data rolling . window = window rolling . min_periods = min_periods rolling . center = center rolling . win_type = win_type rolling . on = on rolling . axis = axis rolling . closed = closed if context . enable_nrt : context . nrt . incref ( builder , self , rolling . data ) return rolling . _getvalue ( ) return sig , _codegen return _hpat_pandas_rolling_init