def adjust_pdata(prob, weights):
    """
    Uses the estimated weights to modify pdata values

    weights represent p(not expressed | not detected)

    Parameters
    ----------
    prob : (Num_Genes x Num_Samples) numpy.ndarray
        Matrix containing estimate for probability of expression of each gene in each sample
    weights : (Num_Genes x Num_Samples) numpy.ndarray
        Matrix containing estimate for p(not expressed | not detected) for each data point

    Returns
    -------
    out_prob : (Num_Genes x Num_Samples) numpy.ndarray    
        Adjusted probability values
    """
    out_prob = prob + (1 - prob) * (1 - weights)
    return out_prob
