from typing import TypeVar

import numpy as np
from numpy.typing import NDArray
from pandera.typing import DataFrame
from typing_extensions import TypeAlias

T = TypeVar("T")

PaDataFrame: TypeAlias = DataFrame[T]

NDArrayGen: TypeAlias = NDArray[np.generic]
NDArrayStr: TypeAlias = NDArray[np.str_]
NDArrayBool: TypeAlias = NDArray[np.bool]

NDArrayInt8: TypeAlias = NDArray[np.int8]
NDArrayInt16: TypeAlias = NDArray[np.int16]
NDArrayInt32: TypeAlias = NDArray[np.int32]
NDArrayInt64: TypeAlias = NDArray[np.int64]
NDArrayInt: TypeAlias = NDArrayInt64

NDArrayFloat32: TypeAlias = NDArray[np.float32]
NDArrayFloat64: TypeAlias = NDArray[np.float64]
NDArrayFloat: TypeAlias = NDArrayFloat64


__all__ = [
    "PaDataFrame",
    "NDArrayGen",
    "NDArrayStr",
    "NDArrayBool",
    "NDArrayInt8",
    "NDArrayInt16",
    "NDArrayInt32",
    "NDArrayInt64",
    "NDArrayInt",
    "NDArrayFloat32",
    "NDArrayFloat64",
    "NDArrayFloat",
]
