def _get_sorted_box_lims(boxes, box_init):
    'Sort the uncertainties for each box in boxes based on a\n    normalization given box_init. Unrestricted dimensions are dropped.\n    The sorting is based on the normalization of the first box in boxes.\n\n    Parameters\n    ----------\n    boxes : list of numpy structured arrays\n    box_init : numpy structured array\n\n    Returns\n    -------\n    tuple\n        with the sorted boxes, and the list of restricted uncertainties\n\n    '
    uncs = set()
    for box in boxes:
        us = _determine_restricted_dims(box, box_init)
        uncs = uncs.union(us)
    uncs = np.asarray(list(uncs))
    box_lim = boxes[0]
    nbl = _normalize(box_lim, box_init, uncs)
    box_size = (nbl[:, 1] - nbl[:, 0])
    uncs = uncs[np.argsort(box_size)]
    box_lims = [box for box in boxes]
    return (box_lims, uncs.tolist())
Sort the uncertainties for each box in boxes based on a
normalization given box_init. Unrestricted dimensions are dropped.
The sorting is based on the normalization of the first box in boxes.

Parameters
----------
boxes : list of numpy structured arrays
box_init : numpy structured array

Returns
-------
tuple
    with the sorted boxes, and the list of restricted uncertainties
def _get_sorted_box_lims(boxes, box_init):
    'Sort the uncertainties for each box in boxes based on a\n    normalization given box_init. Unrestricted dimensions are dropped.\n    The sorting is based on the normalization of the first box in boxes.\n\n    Parameters\n    ----------\n    boxes : list of numpy structured arrays\n    box_init : numpy structured array\n\n    Returns\n    -------\n    tuple\n        with the sorted boxes, and the list of restricted uncertainties\n\n    '
    uncs = set()
    for box in boxes:
        us = _determine_restricted_dims(box, box_init)
        uncs = uncs.union(us)
    uncs = np.asarray(list(uncs))
    box_lim = boxes[0]
    nbl = _normalize(box_lim, box_init, uncs)
    box_size = (nbl[:, 1] - nbl[:, 0])
    uncs = uncs[np.argsort(box_size)]
    box_lims = [box for box in boxes]
    return (box_lims, uncs.tolist())