# File generated with docstub

from collections.abc import Callable, Generator, Hashable, Mapping, Sequence
from itertools import product, tee
from typing import Any

import numpy as np
import xarray as xr
from _typeshed import Incomplete
from numpy.typing import NDArray
from xarray import DataArray, Dataset

from arviz_base.labels import BaseLabeller
from arviz_base.rcparams import rcParams

__all__ = ["xarray_sel_iter", "xarray_var_iter", "xarray_to_ndarray"]

def _dims(data: Incomplete, var_name: Incomplete, skip_dims: Incomplete) -> None: ...
def _zip_dims(new_dims: Incomplete, vals: Incomplete) -> None: ...
def xarray_sel_iter(
    data: Dataset | DataArray,
    var_names: Sequence[Hashable] | None = ...,
    combined: bool | None = ...,
    skip_dims: set | None = ...,
    dim_to_idx: Mapping[Any, Hashable] | None = ...,
    reverse_selections: bool = ...,
) -> Generator[tuple[str, dict[Any, Any], dict[Any, Any]]]: ...
def xarray_var_iter(
    data: Dataset,
    var_names: Sequence[Hashable] | None = ...,
    combined: bool | None = ...,
    skip_dims: set | None = ...,
    dim_to_idx: Mapping[Any, Hashable] | None = ...,
    reverse_selections: bool = ...,
    dim_order: list | None = ...,
) -> Generator[tuple[str, dict[Any, Any], dict[Any, Any], DataArray]]: ...
def xarray_to_ndarray(
    data: Dataset,
    *,
    var_names: Sequence[Hashable] | None = ...,
    combined: bool = ...,
    label_fun: Callable | None = ...
) -> tuple[list, NDArray]: ...
