From 08a80ae61c45741585f603519950dc96e4e43930 Mon Sep 17 00:00:00 2001
From: Gamelin Alexis <alexis.gamelin@synchrotron-soleil.fr>
Date: Wed, 23 Nov 2022 12:25:41 +0100
Subject: [PATCH] Suppress numpy warning in WakePotential

Suppress numpy warning for floating-point operations in the WakePotential class.
---
 mbtrack2/tracking/wakepotential.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mbtrack2/tracking/wakepotential.py b/mbtrack2/tracking/wakepotential.py
index fcd0d50..94a2436 100644
--- a/mbtrack2/tracking/wakepotential.py
+++ b/mbtrack2/tracking/wakepotential.py
@@ -77,6 +77,9 @@ class WakePotential(Element):
         self.ring = ring
         self.n_bin = n_bin
         self.check_sampling()
+        
+        # Suppress numpy warning for floating-point operations.
+        np.seterr(invalid='ignore')
             
     def charge_density(self, bunch):
         """
-- 
GitLab