# Path: zarr/errors.py
# class ArrayIndexError(IndexError):
#     pass
# 
# class NegativeStepError(IndexError):
#     def __init__(self):
#         super().__init__("only slices with step >= 1 are supported")
# 
# def err_too_many_indices(selection, shape):
#     raise IndexError('too many indices for array; expected {}, got {}'
#                      .format(len(shape), len(selection)))
# 
# class VindexInvalidSelectionError(_BaseZarrIndexError):
#     _msg = (
#         "unsupported selection type for vectorized indexing; only "
#         "coordinate selection (tuple of integer arrays) and mask selection "
#         "(single Boolean array) are supported; got {0!r}"
#     )
# 
# class BoundsCheckError(_BaseZarrIndexError):
#     _msg = "index out of bounds for dimension with length {0}"


import collections
import itertools
import math
import numbers
import numpy as np
from zarr.errors import (
    ArrayIndexError,
    NegativeStepError,
    err_too_many_indices,
    VindexInvalidSelectionError,
    BoundsCheckError,
)
                for elem in selection)
        )
    )
    return (
        no_slicing and
        all(
            is_integer(elem)
            or is_integer_list(elem)
            or is_integer_array(elem)
            for elem in selection
        ) and
        any(
            is_integer_list(elem)
            or is_integer_array(elem)
            for elem in selection
        )
    )


def normalize_integer_selection(dim_sel, dim_len):

    # normalize type to int
    dim_sel = int(dim_sel)

    # handle wraparound
    if dim_sel < 0:
        dim_sel = dim_len + dim_sel

    # handle out of bounds
    if dim_sel >= dim_len or dim_sel < 0:

# Path: zarr/errors.py
# class ArrayIndexError(IndexError):
#     pass
# 
# class NegativeStepError(IndexError):
#     def __init__(self):
#         super().__init__("only slices with step >= 1 are supported")
# 
# def err_too_many_indices(selection, shape):
#     raise IndexError('too many indices for array; expected {}, got {}'
#                      .format(len(shape), len(selection)))
# 
# class VindexInvalidSelectionError(_BaseZarrIndexError):
#     _msg = (
#         "unsupported selection type for vectorized indexing; only "
#         "coordinate selection (tuple of integer arrays) and mask selection "
#         "(single Boolean array) are supported; got {0!r}"
#     )
# 
# class BoundsCheckError(_BaseZarrIndexError):
#     _msg = "index out of bounds for dimension with length {0}"


# Path: zarr/indexing.py
import collections
import itertools
import math
import numbers
import numpy as np
from zarr.errors import (
    ArrayIndexError,
    NegativeStepError,
    err_too_many_indices,
    VindexInvalidSelectionError,
    BoundsCheckError,
)

                for elem in selection)
        )
    )
    return (
        no_slicing and
        all(
            is_integer(elem)
            or is_integer_list(elem)
            or is_integer_array(elem)
            for elem in selection
        ) and
        any(
            is_integer_list(elem)
            or is_integer_array(elem)
            for elem in selection
        )
    )


def normalize_integer_selection(dim_sel, dim_len):

    # normalize type to int
    dim_sel = int(dim_sel)

    # handle wraparound
    if dim_sel < 0:
        dim_sel = dim_len + dim_sel

    # handle out of bounds
    if dim_sel >= dim_len or dim_sel < 0:

        raise BoundsCheckError(dim_len)