from __future__ import annotations
from typing import Union

import numpy as np

from numpy import typing as nptyping

import xarray as xr
import torch



NDArray = Union[nptyping.NDArray[np.float_], nptyping.NDArray[np.int_], nptyping.NDArray[np.bool_], xr.DataArray, torch.Tensor]

number = Union[int, float, complex, np.int_, np.float_, np.complex_, np.bool_]


# class NumberArray(Protocol):
#
#     def __array__(self, dtype: Any=...) -> ndarray[Any, Any]: ...
#
#     def __neg__(self) -> NumberArray: ...
#
#     def __abs__(self) -> NumberArray: ...
#
#     def __add__(self, other: _ArrayLike) -> NumberArray: ...
#
#     def __radd__(self, other: _ArrayLike) -> NumberArray: ...
#
#     def __mul__(self, other: _ArrayLike) -> NumberArray: ...
#     def __rmul__(self, other: _ArrayLike) -> NumberArray: ...
#
#     def __truediv__(self, other: _ArrayLike) -> NumberArray: ...
#     def __rtruediv__(self, other: _ArrayLike) -> NumberArray: ...
#
#     def __floordiv__(self, other: _ArrayLike) -> NumberArray: ...
#     def __rfloordiv__(self, other: _ArrayLike) -> NumberArray: ...
#
#
#     def __mod__(self, other: _ArrayLike) -> NumberArray: ...
#     def __rmod__(self, other: _ArrayLike) -> NumberArray: ...
#
#     def __and__(self, other: _ArrayLike) -> BoolArray: ...
#     def __rand__(self, other: _ArrayLike) -> BoolArray: ...
#
#     def __or__(self, other: _ArrayLike) -> BoolArray: ...
#     def __ror__(self, other: _ArrayLike) -> BoolArray: ...
#
#     def __gt__(self, other: _ArrayLike) -> BoolArray: ...
#     def __ge__(self, other: _ArrayLike) -> BoolArray: ...
#
#     def __lt__(self, other: _ArrayLike) -> BoolArray: ...
#     def __le__(self, other: _ArrayLike) -> BoolArray: ...
#    
#     def __eq__(self, other: _ArrayLike) -> BoolArray: ...
#
#
# class BoolArray(Protocol):
#
#     def __array__(self, dtype: Any) -> ndarray[Any, Any]: ...
#
#     def __and__(self, other: _ArrayLike) -> BoolArray: ...
#     def __rand__(self, other: _ArrayLike) -> BoolArray: ...
#
#     def __or__(self, other: _ArrayLike) -> BoolArray: ...
#     def __ror__(self, other: _ArrayLike) -> BoolArray: ...
#
#     def __eq__(self, other: _ArrayLike) -> BoolArray: ...
#    
#
#
