From c38015375ef14b54f918599297a6a21da41c9dec Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 24 Mar 2025 13:44:04 +0100 Subject: utils.human_readable: handle value is None --- lib/utils.py | 2 ++ 1 file changed, 2 insertions(+) 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), -- cgit v1.2.3