X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FPLRsearch%2Flog_plus.py;fp=resources%2Flibraries%2Fpython%2FPLRsearch%2Flog_plus.py;h=aabefdb5bec5e5c8e0f134621fe2fda5c342f757;hb=fcd0677317970062b37e196b4d1a15a135f51cca;hp=8ede2909c65f16c34e79c00463dd888c9b6cc813;hpb=852f60f525fdc6080387fe6a3b297736c83f0834;p=csit.git diff --git a/resources/libraries/python/PLRsearch/log_plus.py b/resources/libraries/python/PLRsearch/log_plus.py index 8ede2909c6..aabefdb5be 100644 --- a/resources/libraries/python/PLRsearch/log_plus.py +++ b/resources/libraries/python/PLRsearch/log_plus.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2024 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -76,14 +76,14 @@ def log_minus(first, second): :raises RuntimeError: If the difference would be non-positive. """ if first is None: - raise RuntimeError(u"log_minus: does not support None first") + raise RuntimeError("log_minus: does not support None first") if second is None: return first if second >= first: - raise RuntimeError(u"log_minus: first has to be bigger than second") + raise RuntimeError("log_minus: first has to be bigger than second") factor = -math.expm1(second - first) if factor <= 0.0: - msg = u"log_minus: non-positive number to log" + msg = "log_minus: non-positive number to log" else: return first + math.log(factor) raise RuntimeError(msg)