From f1765060fbb62952bb42c71ff13f73ef2421efec Mon Sep 17 00:00:00 2001 From: federico-carrara Date: Mon, 12 Oct 2026 22:39:30 +0200 Subject: [PATCH] fix: bug with PMT model when a simulation has a single channel --- src/microsim/schema/detectors/_point.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/microsim/schema/detectors/_point.py b/src/microsim/schema/detectors/_point.py index 3b8838d0..4a785d74 100644 --- a/src/microsim/schema/detectors/_point.py +++ b/src/microsim/schema/detectors/_point.py @@ -255,7 +255,7 @@ def _per_channel(func: Any, x: "npt.NDArray", dt: Any, *args: Any) -> "npt.NDArr """Call `func(x, dt, *args)`, per channel (first axis) if `dt` is per channel.""" x, dt = np.asarray(x, dtype=float), np.asarray(dt, dtype=float) if dt.size == 1: - return func(x, float(dt), *args) # type: ignore[no-any-return] + return func(x, float(dt.item()), *args) # type: ignore[no-any-return] return np.stack( [func(xc, float(d), *args) for d, xc in zip(dt.ravel(), x, strict=True)] )