diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-03-24 13:44:04 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-03-24 13:44:04 +0100 |
commit | c38015375ef14b54f918599297a6a21da41c9dec (patch) | |
tree | a3d4dd8406db0a47016545ce8f642befcb282710 | |
parent | 635d9135f740a650b89026dbf198c163284bd1fa (diff) |
utils.human_readable: handle value is None
-rw-r--r-- | lib/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/utils.py b/lib/utils.py index 228e78c..ae0e3f7 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -48,6 +48,8 @@ def running_mean(x: np.ndarray, N: int) -> np.ndarray: def human_readable(value, unit): + if value is None: + return value for prefix, factor in ( ("p", 1e-12), ("n", 1e-9), |