def negative_predictive_value(y_real, y_pred):
    """
    Computes negative predictive value of a binary classification model: NPV = TN/(TN+FN).

    Args:
        y_real (np.array): Array of ground truth values

        y_pred (np.array): Array of predicted values

    Returns:
        (float): The negative predictive value

    """
    TN = sum((y_pred == 0) & (y_real == 0))
    FN = sum((y_pred == 0) & (y_real == 1))
    if TN + FN == 0:
        return 0.0
    else:
        return float(TN)/float(TN+FN)