keras/src/metrics/confusion_metrics.py/Precision/result
class Precision:    def result(self):
        result = ops.divide_no_nan(
            self.true_positives,
            ops.add(self.true_positives, self.false_positives),
        )
        return result[0] if len(self.thresholds) == 1 else result