"""
This type stub file was generated by pyright.
"""

import functools
import numpy as np
from typing import Callable
from pandas._typing import Scalar

@functools.lru_cache(maxsize=None)
def generate_numba_apply_func(func: Callable[..., Scalar], nopython: bool, nogil: bool, parallel: bool): # -> (values: ndarray[Unknown, Unknown], begin: ndarray[Unknown, Unknown], end: ndarray[Unknown, Unknown], minimum_periods: int, *args: Any) -> ndarray[Unknown, Unknown]:
    """
    Generate a numba jitted apply function specified by values from engine_kwargs.

    1. jit the user's function
    2. Return a rolling apply function with the jitted function inline

    Configurations specified in engine_kwargs apply to both the user's
    function _AND_ the rolling apply function.

    Parameters
    ----------
    func : function
        function to be applied to each window and will be JITed
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit

    Returns
    -------
    Numba function
    """
    ...

@functools.lru_cache(maxsize=None)
def generate_numba_ewm_func(nopython: bool, nogil: bool, parallel: bool, com: float, adjust: bool, ignore_na: bool, deltas: tuple, normalize: bool): # -> (values: ndarray[Unknown, Unknown], begin: ndarray[Unknown, Unknown], end: ndarray[Unknown, Unknown], minimum_periods: int) -> ndarray[Unknown, Unknown]:
    """
    Generate a numba jitted ewm mean or sum function specified by values
    from engine_kwargs.

    Parameters
    ----------
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit
    com : float
    adjust : bool
    ignore_na : bool
    deltas : tuple
    normalize : bool

    Returns
    -------
    Numba function
    """
    ...

@functools.lru_cache(maxsize=None)
def generate_numba_table_func(func: Callable[..., np.ndarray], nopython: bool, nogil: bool, parallel: bool): # -> (values: ndarray[Unknown, Unknown], begin: ndarray[Unknown, Unknown], end: ndarray[Unknown, Unknown], minimum_periods: int, *args: Any) -> NDArray[Any]:
    """
    Generate a numba jitted function to apply window calculations table-wise.

    Func will be passed a M window size x N number of columns array, and
    must return a 1 x N number of columns array. Func is intended to operate
    row-wise, but the result will be transposed for axis=1.

    1. jit the user's function
    2. Return a rolling apply function with the jitted function inline

    Parameters
    ----------
    func : function
        function to be applied to each window and will be JITed
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit

    Returns
    -------
    Numba function
    """
    ...

@functools.lru_cache(maxsize=None)
def generate_manual_numpy_nan_agg_with_axis(nan_func): # -> (table: Unknown) -> NDArray[float64]:
    ...

@functools.lru_cache(maxsize=None)
def generate_numba_ewm_table_func(nopython: bool, nogil: bool, parallel: bool, com: float, adjust: bool, ignore_na: bool, deltas: tuple, normalize: bool): # -> (values: ndarray[Unknown, Unknown], begin: ndarray[Unknown, Unknown], end: ndarray[Unknown, Unknown], minimum_periods: int) -> ndarray[Unknown, Unknown]:
    """
    Generate a numba jitted ewm mean or sum function applied table wise specified
    by values from engine_kwargs.

    Parameters
    ----------
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit
    com : float
    adjust : bool
    ignore_na : bool
    deltas : tuple
    normalize: bool

    Returns
    -------
    Numba function
    """
    ...

