From 5224c86035d29cbf769aade41b7f0db510671172 Mon Sep 17 00:00:00 2001 From: troyyyyy <49091847+troyyyyy@users.noreply.github.com> Date: Sat, 19 Nov 2022 10:09:36 +0800 Subject: [PATCH] Update kb.py --- abducer/kb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abducer/kb.py b/abducer/kb.py index a448a83..85c7519 100644 --- a/abducer/kb.py +++ b/abducer/kb.py @@ -134,7 +134,7 @@ class hwf_KB(ClsKB): if(self.valid_formula(formula) == False): return np.inf try: - return eval(''.join(formula)) + return round(eval(''.join(formula)), 2) except ZeroDivisionError: return np.inf