"""Typing defines common (redefined/new) typings shared across `tklearn`.

For generic typings use respective packages:
    - `typing`
    - `collections`
    - `numpy`
    - `pandas`
    - base types

The definition of types may be slightly constrained than other popular
implementations like `pandas` and `numpy`.
"""

from typing import Union
import numpy as np

try:
    from collections.abc import Sequence, Mapping, Iterable
except ImportError:
    from collections import Sequence, Mapping, Iterable

__all__ = [
    'Array',
    'ArrayLike',
    'Mapping',
    'Sequence',
    'Iterable',
]

Array = Union[np.ndarray, np.ma.MaskedArray]
ArrayLike = Union[Array, Sequence]
