def _normalize(box_lim, box_init, uncertainties):
    'Normalize the given box lim to the unit interval derived\n    from box init for the specified uncertainties.\n\n    Categorical uncertainties are normalized based on fractionated. So\n    value specifies the fraction of categories in the box_lim.\n\n    Parameters\n    ----------\n    box_lim : DataFrame\n    box_init :  DataFrame\n    uncertainties : list of strings\n                    valid names of columns that exist in both structured\n                    arrays.\n\n    Returns\n    -------\n    ndarray\n        a numpy array of the shape (2, len(uncertainties) with the\n        normalized box limits.\n\n\n    '
    norm_box_lim = np.zeros((len(uncertainties), box_lim.shape[0]))
    for (i, u) in enumerate(uncertainties):
        dtype = box_lim[u].dtype
        if (dtype == np.dtype(object)):
            nu = (len(box_lim.loc[(0, u)]) / len(box_init.loc[(0, u)]))
            nl = 0
        else:
            (lower, upper) = box_lim.loc[:, u]
            dif = (box_init.loc[(1, u)] - box_init.loc[(0, u)])
            a = (1 / dif)
            b = (((- 1) * box_init.loc[(0, u)]) / dif)
            nl = ((a * lower) + b)
            nu = ((a * upper) + b)
        norm_box_lim[i, :] = (nl, nu)
    return norm_box_lim
Normalize the given box lim to the unit interval derived
from box init for the specified uncertainties.

Categorical uncertainties are normalized based on fractionated. So
value specifies the fraction of categories in the box_lim.

Parameters
----------
box_lim : DataFrame
box_init :  DataFrame
uncertainties : list of strings
                valid names of columns that exist in both structured
                arrays.

Returns
-------
ndarray
    a numpy array of the shape (2, len(uncertainties) with the
    normalized box limits.
def _normalize(box_lim, box_init, uncertainties):
    'Normalize the given box lim to the unit interval derived\n    from box init for the specified uncertainties.\n\n    Categorical uncertainties are normalized based on fractionated. So\n    value specifies the fraction of categories in the box_lim.\n\n    Parameters\n    ----------\n    box_lim : DataFrame\n    box_init :  DataFrame\n    uncertainties : list of strings\n                    valid names of columns that exist in both structured\n                    arrays.\n\n    Returns\n    -------\n    ndarray\n        a numpy array of the shape (2, len(uncertainties) with the\n        normalized box limits.\n\n\n    '
    norm_box_lim = np.zeros((len(uncertainties), box_lim.shape[0]))
    for (i, u) in enumerate(uncertainties):
        dtype = box_lim[u].dtype
        if (dtype == np.dtype(object)):
            nu = (len(box_lim.loc[(0, u)]) / len(box_init.loc[(0, u)]))
            nl = 0
        else:
            (lower, upper) = box_lim.loc[:, u]
            dif = (box_init.loc[(1, u)] - box_init.loc[(0, u)])
            a = (1 / dif)
            b = (((- 1) * box_init.loc[(0, u)]) / dif)
            nl = ((a * lower) + b)
            nu = ((a * upper) + b)
        norm_box_lim[i, :] = (nl, nu)
    return norm_box_lim