From db81d25f9df2bb5269a21b198ca7934075d890a7 Mon Sep 17 00:00:00 2001
From: Philipp Schmidt <philipp.schmidt@xfel.eu>
Date: Mon, 6 Dec 2021 14:40:38 +0100
Subject: [PATCH] Use ndarray.nonzero() rather than np.where() in REMI
 reconstruct

---
 notebooks/REMI/REMI_Digitize_and_Transform.ipynb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/notebooks/REMI/REMI_Digitize_and_Transform.ipynb b/notebooks/REMI/REMI_Digitize_and_Transform.ipynb
index b9328aafa..8d7ce5a45 100644
--- a/notebooks/REMI/REMI_Digitize_and_Transform.ipynb
+++ b/notebooks/REMI/REMI_Digitize_and_Transform.ipynb
@@ -488,8 +488,8 @@
     "        if not finite_edges.any():\n",
     "            continue\n",
     "            \n",
-    "        pulse_idx = np.where(finite_edges)[0][0]\n",
-    "        train_idx = np.where(pulse_idx >= pulse_offsets)[0][-1]\n",
+    "        pulse_idx = finite_edges.nonzero()[0][0]\n",
+    "        train_idx = (pulse_idx >= pulse_offsets).nonzero()[0][-1]\n",
     "        trigger = triggers[pulse_idx]\n",
     "        \n",
     "        sourcekey = remi.get_channel_sourcekey(\n",
-- 
GitLab