def compensate_frequency(values, divisors):
    """
    Helper method used for special_weight_normalize2D to compensate frequency (for correlation values only), basically
    it receives 2 lists and it divides the values of one using the values of other.

    :param values: 2 dimensional list of values which will be divided.
    :param divisors: 2 dimensional list of values which will be used to divide the other.
    :return: Resultant 2 dimensional list of values after the operation.
    """
    sz = len(values[0])
    comp_list = list()
    for i in range(sz):
        temp_list = list()
        for j in range(sz):
            if divisors[i][j] > 0.0:
                temp_list.append(values[i][j] / divisors[i][j])
            else:
                temp_list.append(values[i][j])
        comp_list.append(temp_list)
    return comp_list