alpaca/alpacka/data/ops.py
def nested_unzip(x):
    """Uzips a pytree of lists.

    Inverse of nested_unzip.

    Example:
        nested_unzip((([1, 4], [2, 5]), [3, 6])) == [((1, 2), 3), ((4, 5), 6)]
    """
    acc = []
    try:
        i = 0
        while True:
            acc.append(nested_map(
                lambda l: l[i],
                x,
                stop_fn=_is_last_level_nonempty,
            ))
            i += 1
    except IndexError:
        return acc
Uzips a pytree of lists.

    Inverse of nested_unzip.

    Example:
        nested_unzip((([1, 4], [2, 5]), [3, 6])) == [((1, 2), 3), ((4, 5), 6)]
    
Uzips a pytree of lists.
Uzips a pytree of lists .
def nested_unzip(x):
    acc = []
    try:
        i = 0
        while True:
            acc.append(nested_map(
                lambda l: l[i],
                x,
                stop_fn=_is_last_level_nonempty,
            ))
            i += 1
    except IndexError:
        return acc
def nested_unzip ( x ) : acc = [ ] try : i = 0 while True : acc . append ( nested_map ( lambda l : l [ i ] , x , stop_fn = _is_last_level_nonempty , ) ) i += 1 except IndexError : return acc
Uzips a pytree of lists.
Uzips a pytree of lists .
"""Uzips a pytree of lists.

    Inverse of nested_unzip.

    Example:
        nested_unzip((([1, 4], [2, 5]), [3, 6])) == [((1, 2), 3), ((4, 5), 6)]
    """
x
examples
None