aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/PLRsearch/log_plus.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2024-01-12 14:50:52 +0100
committerVratko Polak <vrpolak@cisco.com>2024-01-24 12:28:58 +0100
commitfcd0677317970062b37e196b4d1a15a135f51cca (patch)
treef9355ec08094de2e863c2fceea465f7f3c6b54cc /resources/libraries/python/PLRsearch/log_plus.py
parent852f60f525fdc6080387fe6a3b297736c83f0834 (diff)
style(PLRsearch): format according to black
Change-Id: I26e0ce172740f7f440469578294f8c13fec5850b Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/PLRsearch/log_plus.py')
-rw-r--r--resources/libraries/python/PLRsearch/log_plus.py8
1 files changed, 4 insertions, 4 deletions
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)