Returns numerator / denominator, but instead of a ZeroDivisionError:
        0 / 0 = 0.
        x / 0 = float('inf')
    This is not mathematically correct, but often practically OK.

    Args:
        numerator (float or int)
        denominator (float or int)
    Returns:
        (float)
    Raises:
        -

def div(numerator, denominator):
    '''
    Returns numerator / denominator, but instead of a ZeroDivisionError:
        0 / 0 = 0.
        x / 0 = float('inf')
    This is not mathematically correct, but often practically OK.

    Args:
        numerator (float or int)
        denominator (float or int)
    Returns:
        (float)
    Raises:
        -
    '''
    try:
        return numerator/denominator
    except ZeroDivisionError:
        if numerator == 0:
            return 0.
        elif denominator == 0:
            return float('inf')
#            return None
        else:
            return numerator/denominator