def get_dim(array, dims):
    """
    Get the values of an array given dimensions, where
    dims is an int or tuple of indicies, where an index can
    be None.. None means the entire dimension.

    >>> test = [
    ...     [[1], [2], [3]],
    ...     [[11], [22], [33]],
    ...     [[111], [222], [333]],
    ...     [[1111], [2222], [3333]],
    ... ]

    >>> get_dim(test, 0)
    [[1], [2], [3]]

    >>> get_dim(test, 1)
    [[11], [22], [33]]

    >>> get_dim(test, (None, 0, 0))
    [1, 11, 111, 1111]

    >>> get_dim(test, (None, None, 0))
    [[1, 2, 3], [11, 22, 33], [111, 222, 333], [1111, 2222, 3333]]

    >>> get_dim(test, (0, None, 0))
    [1, 2, 3]
    """
    if isinstance(dims, int):
        dims = (dims,)
    if len(dims) == 0:
        return array
    elif dims[0] is None:
        return [get_dim(col, dims[1:]) for col in array]
    else:
        return get_dim(array[dims[0]], dims[1:])