diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-02-24 15:24:04 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-02-24 15:24:04 +0100 |
commit | 5a7a03543379507f29d5af03110d94915a322b1c (patch) | |
tree | 3faf5edc2b15a9272d134eb1266345a6a2cab3d7 /lib | |
parent | f71b18665993fb0f902ee1057a9dfe6bec16303a (diff) |
AnalyticFunction: catch dividy by zero errors and the likes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/functions.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/functions.py b/lib/functions.py index 8e25ad3..69788df 100644 --- a/lib/functions.py +++ b/lib/functions.py @@ -722,7 +722,13 @@ class AnalyticFunction(ModelFunction): corresponds to lexically first parameter, etc. :param arg_list: argument values (list of float), if arguments are used. """ - return self._function(self.model_args, param_list) + try: + return self._function(self.model_args, param_list) + except FloatingPointError as e: + logger.error( + f"{e} when predicting {self._function_str}({param_list}), returning static value" + ) + return self.value def webconf_function_map(self): js_buf = self.model_function |