From 784fb8d2acbfc7cf6d27eb324cbfd63c58d2861b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulina=20D=C4=85browska?= <22954452+PaulinaDabrowska@users.noreply.github.com> Date: Mon, 10 Jan 2022 09:16:32 +0100 Subject: [PATCH] Added missing rescaling of t_start and t_stop to the units of spiketrain (#425) --- elephant/conversion.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/elephant/conversion.py b/elephant/conversion.py index 4f5dc5672..0c9615258 100644 --- a/elephant/conversion.py +++ b/elephant/conversion.py @@ -541,8 +541,10 @@ def check_consistency(): self._t_start = self._t_start.rescale(self.units).item() self._t_stop = self._t_stop.rescale(self.units).item() - start_shared = max(st.t_start.item() for st in spiketrains) - stop_shared = min(st.t_stop.item() for st in spiketrains) + start_shared = max(st.t_start.rescale(self.units).item() + for st in spiketrains) + stop_shared = min(st.t_stop.rescale(self.units).item() + for st in spiketrains) tolerance = self.tolerance if tolerance is None: