From c73ac9a622926252847192582674c07b70663bcb Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Thu, 2 May 2024 11:48:07 +0200 Subject: [PATCH] more precision for output --- ostap/frames/tree_reduce.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ostap/frames/tree_reduce.py b/ostap/frames/tree_reduce.py index 9d20e75d..cc4ff39a 100644 --- a/ostap/frames/tree_reduce.py +++ b/ostap/frames/tree_reduce.py @@ -207,10 +207,10 @@ def __init__ ( self , nb = len ( self.__chain.branches () ) ne = len ( self.__chain ) - ff = float ( nb * ne * 100 ) / ( nb0 * ne0 ) + ff = float ( nb * ne * 100 ) / ( nb0 * ne0 ) - self.__report += '\n# Reduce: (%dx%d) -> (%dx%d) branches x entries => %.1f%% ' % ( nb0 , ne0 , nb , ne , ff ) - self.__report += '\n# Output:%s size:%s' % ( self.__output , fs ) + self.__report += '\n# Reduce: (%dx%d) -> (%dx%d) branches x entries => %.2%% ' % ( nb0 , ne0 , nb , ne , ff ) + self.__report += '\n# Output:%s size:%s' % ( self.__output , fs ) ## self.__report += '\n# %s' % str ( self.__chain ) del self.__frame_main @@ -320,7 +320,7 @@ def reduce ( tree , ne = len ( result.chain ) f = float ( nb0 * ne0 ) / ( nb * ne ) ## sys.stdout.write('\n') - logger.info ( 'reduce: (%dx%d) -> (%dx%d) %.1f (branches x entries) ' % ( nb0 , ne0 , nb , ne , f ) ) + logger.info ( 'reduce: (%dx%d) -> (%dx%d) %.2f (branches x entries) ' % ( nb0 , ne0 , nb , ne , f ) ) return result