From 372dacb74d0649be6fd67a9e0dff1bf1359008c1 Mon Sep 17 00:00:00 2001 From: sldesnoo-Delft <s.l.desnoo@tudelft.nl> Date: Sat, 28 Jan 2023 16:21:13 +0100 Subject: [PATCH] Fixed rounding of negative numbers --- pulse_lib/segments/utility/rounding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulse_lib/segments/utility/rounding.py b/pulse_lib/segments/utility/rounding.py index 32e1a2bf..10a7c28a 100644 --- a/pulse_lib/segments/utility/rounding.py +++ b/pulse_lib/segments/utility/rounding.py @@ -4,4 +4,4 @@ def iround(value): ''' Fast implementation of round which uses half-up, i.s.o. half-even rounding. ''' - return np.int_(value + 0.5) + return np.floor(value + 0.5).astype(int) -- GitLab