From 23ba7c855fe6d6e9e3212e854203992f73771735 Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Tue, 6 Aug 2024 13:49:35 +0200 Subject: [PATCH] suppress warning --- ostap/math/bspline.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ostap/math/bspline.py b/ostap/math/bspline.py index 5830123a..12fbc124 100755 --- a/ostap/math/bspline.py +++ b/ostap/math/bspline.py @@ -45,7 +45,6 @@ 'shoot' , ## generate random numbers ) # ============================================================================= -import ROOT, math from ostap.core.core import Ostap, funID from ostap.core.ostap_types import is_integer, integer_types from ostap.math.base import iszero, isequal, signum, doubles @@ -53,7 +52,7 @@ import ostap.math.reduce import ostap.math.bernstein import ostap.math.polynomials - +import ROOT, math, warnings # ============================================================================= # logging # ============================================================================= @@ -262,8 +261,6 @@ def interpolate ( func , abscissas , spline , *args ) : from ostap.math.interpolation import points table = points ( func , abscissas ) - ## print ( "Table", type ( table ) , table.size () ) - if root_info < (6 , 24 ) and 16 < len ( table ) and table.atype() < 0 : logger.warning ('interpoalte: segmentation fault can occur for large number of points') @@ -278,7 +275,9 @@ def interpolate ( func , abscissas , spline , *args ) : try : # ========================================================================= - import scipy.interpolate + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + import scipy.interpolate # ========================================================================= ## create interpolation spline using scipy machinery # @code