def k_calc(BP_RP, A_0, c_array):
    """Calculate the extinction coefficient.

    Parameters
    ----------
    BP_RP   : array
              The Gaia BP-RP colour of the target(s)
    A_0     : float
              The extinction coefficient
    c_array : list
              Parameters used to derive the Gaia extinction
              coefficients as a function of colour and extinction

    Returns
    ----------
    The ratio of A_X/A_0 for a given BP-RP colour.

    References
    ----------
    Babusiaux et al (2018) 10.1051/0004-6361/201832843
    """
    return (c_array[0] +
            c_array[1]*BP_RP +
            c_array[2]*BP_RP**2 +
            c_array[3]*BP_RP**3 +
            c_array[4]*A_0 +
            c_array[5]*A_0**2 +
            c_array[6]*BP_RP*A_0)