def precision(tp,fp):
    """Computes precision for an array of true positives and false positives

    Arguments:
        tp {[type]} -- True positives
        fp {[type]} -- False positives

    Returns:
        [type] -- Precision
    """

    return tp / (tp+fp+1e-10)