From bd44ea2fc633a0f12e432619c337cd9c7e499243 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Mon, 5 Jan 2026 14:50:22 +0100 Subject: [PATCH] maybe nicer --- slic/devices/general/motor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slic/devices/general/motor.py b/slic/devices/general/motor.py index 36841ccd..a4ada052 100644 --- a/slic/devices/general/motor.py +++ b/slic/devices/general/motor.py @@ -142,8 +142,8 @@ class Motor(Adjustable, SpecConvenienceProgress): self._motor.put(low_name, low) self._motor.put(high_name, high) return - low = -np.inf if low is None else low - high = +np.inf if high is None else high + if low is None: low = -np.inf + if high is None: high = +np.inf if relative_to_current: val = self.get_current_value(pos_type=pos_type) low += val