From 7813c67970f3c7ff13149adb7652c9f3f65304bd Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Mon, 11 Mar 2024 08:25:04 +0100 Subject: [PATCH] fix --- ostap/utils/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ostap/utils/utils.py b/ostap/utils/utils.py index 2912cdcd..81311233 100644 --- a/ostap/utils/utils.py +++ b/ostap/utils/utils.py @@ -850,7 +850,8 @@ def n ( self ) : def __len__ ( self ) : - n = self.__n + n = self.__n + e = self.__edges return n + 1 if e else n - 1 def __iter__ ( self ) : @@ -922,13 +923,16 @@ def __iter__ ( self ) : fn = 1.0 / float ( n ) e = self.edges + lmn = self.__lmin + lmx = self.__lmx + if e : yield self.vmin for i in range ( 1 , n ) : # f2 = i * fn f1 = 1 - f2 - yield 10.0 ** ( self.__lmin * f1 + f2 * self.__lmax ) + yield 10.0 ** ( lmn * f1 + f2 * lmx ) if e : yield self.vmax