def normalize_ratios(ratios):
    """Normalize list so sum of elements equals 1.

    :param ratios: List of elements to normalize
    :type ratios: list of floats or ints
    :returns: list -- Normalized list of floats

    """
    total = sum(ratios)
    if total != 0:
        new_list = [x/total for x in ratios]
    else:
        raise ValueError('Cannot normalize zero-valued list')

    return new_list