https://github.com/bashtage/arch
Tip revision: ff0b6a62cfac2e848f5e84656eab9989982cc433 authored by Kevin Sheppard on 02 March 2021, 17:30:49 UTC
Merge pull request #460 from bashtage/rls-4.17
Merge pull request #460 from bashtage/rls-4.17
Tip revision: ff0b6a6
typing.py
import datetime as dt
from typing import Callable, Hashable, Optional, Tuple, TypeVar, Union
import numpy as np
from pandas import DataFrame, Series, Timestamp
__all__ = [
"NDArray",
"ArrayLike",
"NDArrayOrFrame",
"AnyPandas",
"DateLike",
"ArrayLike1D",
"ArrayLike2D",
"Label",
"FloatOrArray",
"RNGType",
]
NDArray = Union[np.ndarray]
RNGType = Callable[[Union[int, Tuple[int, ...]]], NDArray]
ArrayLike1D = Union[NDArray, Series]
ArrayLike2D = Union[NDArray, DataFrame]
ArrayLike = Union[NDArray, DataFrame, Series]
NDArrayOrFrame = TypeVar("NDArrayOrFrame", np.ndarray, DataFrame)
AnyPandas = Union[Series, DataFrame]
DateLike = Union[str, dt.datetime, np.datetime64, Timestamp]
Label = Optional[Hashable]
FloatOrArray = TypeVar("FloatOrArray", float, np.ndarray)