From 701e448b17191c43565941bc4e2352678f1b6aa1 Mon Sep 17 00:00:00 2001
From: Arnaud Watlet <arnaud.watlet@umons.ac.be>
Date: Fri, 1 Dec 2023 15:26:55 +0100
Subject: [PATCH] Solves issue #145

---
 ohmpi/ohmpi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ohmpi/ohmpi.py b/ohmpi/ohmpi.py
index 7dafe9f7..7a80013a 100644
--- a/ohmpi/ohmpi.py
+++ b/ohmpi/ohmpi.py
@@ -526,7 +526,7 @@ class OhmPi(object):
                 delay = kwargs['delay']
             else:
                 delay = injection_duration * 2/3  # TODO: check if this is ok and if last point is not taken the end of injection
-            x = np.where((self._hw.readings[:, 0] >= delay) & (self._hw.readings[:, 2] != 0))
+            x = np.where((self._hw.readings[:, 0] >= delay) & (self._hw.readings[:, 2] != 0))[0]
             Vmn = self._hw.last_vmn(delay=delay)
             Vmn_std = self._hw.last_vmn_dev(delay=delay)
             I =  self._hw.last_iab(delay=delay)
-- 
GitLab