@contract
def iqr(data):
    """ Calculate the Interquartile Range from the data.

    :param data: The data to analyze.
     :type data: list(number)

    :return: The calculated IQR.
     :rtype: float
    """
    sorted_data = sorted(data)
    n = len(data) + 1
    q1 = int(round(0.25 * n)) - 1
    q3 = 1 - int(round(0.75 * n))
    return float(sorted_data[q3] - sorted_data[q1])
dataset/ETHPy150Open beloglazov/openstack-neat/neat/locals/overload/statistics.py/iqr/swapped operands of `-`