# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/112_data.ipynb.

# %% auto 0
__all__ = []

# %% ../nbs/112_data.ipynb 6
#| export


# %% ../nbs/112_data.ipynb 8
from typing import TypeAlias, List, Union, Iterable, List

# %% ../nbs/112_data.ipynb 11
# try:
#     import numpy as np
#     arr = np.ndarray
#     mtx = np.matrix
#     dsr = np.DataSource
# except ImportError:
#     # Define a placeholder type if numpy is not installed
#     arr = 'np.ndarray'
#     mtx = 'np.matrix'
#     dsr = 'np.DataSource'

# %% ../nbs/112_data.ipynb 13
# try:
#     import pandas as pd
#     index = pd.Index
#     cindex = pd.CategoricalIndex
#     dframe = pd.DataFrame
#     series = pd.Series
# except ImportError:
#     # Define a placeholder type if pandas is not installed
#     index = 'pd.Index'    
#     dframe = 'pd.DataFrame'
#     series = 'pd.Series'
#     cindex = 'pd.CategoricalIndex'

# %% ../nbs/112_data.ipynb 15
# try:
#     import scipy as sp
#     try:
#         sparr = sp.sparse._arrays._sparray
#     except AttributeError:
#         sparr = sp.sparse.sparray
#     spmtx = sp.sparse.spmatrix
# except ImportError:
#     # Define a placeholder type if scipy is not installed
#     # sparr = 'sp.sparse.sparray'
#     # spmtx = 'sp.sparse.spmatrix'
#     sparr = 'scipy.sparse._base.sparray'
#     spmtx = 'scipy.sparse._matrix.spmatrix'

# %% ../nbs/112_data.ipynb 17
#| export


# %% ../nbs/112_data.ipynb 19
from .bool import Boolish, Bool01
from .nums import Numbers
from .tens import Tensor
from .npty import (NPArray, ndarray, NPMatrix, ndmatrix, DataSource)
from atyp.pdty import (
    Idx, Index, CIdx, CIndex, CatIndex, CategoricalIndex, 
    BoolIndex, BIdx, BooleanIndex,
    Series, DFrame, DataFrame, DataFrames,

    IndexLike, GroupKey
)
from .spty import (SPArray, SPMatrix)

# %% ../nbs/112_data.ipynb 22
NPArray, ndarray, NPMatrix, ndmatrix, DataSource
# NPArray: TypeAlias = arr
# ndarray: TypeAlias = arr
# NPMatrix: TypeAlias = mtx
# ndmatrix: TypeAlias = mtx
# DataSource: TypeAlias = dsr

# %% ../nbs/112_data.ipynb 24
Idx, Index, CIdx, CIndex, CatIndex, CategoricalIndex, BoolIndex, BIdx, BooleanIndex, Series, DFrame, DataFrame, DataFrames
# Idx: TypeAlias = index
# Index: TypeAlias = index


# CIdx: TypeAlias = cindex
# CIndex: TypeAlias = cindex
# CatIndex: TypeAlias = cindex
# CategoricalIndex: TypeAlias = cindex

# Series: TypeAlias = series

# DFrame: TypeAlias = dframe
# DataFrame: TypeAlias = dframe
# DataFrames: TypeAlias = List[DataFrame]

# %% ../nbs/112_data.ipynb 26
IndexLike
# IndexLike: TypeAlias = Union[Numbers, List[Boolish], Index]
# SeriesLike: TypeAlias = Union[list, Series, ndarray, Tensor, IndexLike]
# IterLike: TypeAlias = Union[Iterable, SeriesLike, IndexLike]

# %% ../nbs/112_data.ipynb 27
GroupKey
# GroupKey: TypeAlias = Union[str, int, float, tuple] # key for pandas groupby

# %% ../nbs/112_data.ipynb 29
SPArray, SPMatrix
# SPArray: TypeAlias = sparr
# SPMatrix: TypeAlias = spmtx
