Skip to content

Commit c269859

Browse files
committed
fixes&tweaks
1 parent e587261 commit c269859

2 files changed

Lines changed: 199 additions & 87 deletions

File tree

ostap/fitting/roofitresult.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ def _rfr_getitem_ ( self , key ) :
410410
>>> fit_result = ...
411411
>>> sigma = fit_result['sigma']
412412
"""
413-
413+
if isinstance ( key , ROOT.RooAbsReal ) :
414+
return _rfr_getitem_ ( self , key.GetName() )
414415
##
415416
pars = self.floatParsFinal()
416417
for p in pars :
@@ -420,7 +421,7 @@ def _rfr_getitem_ ( self , key ) :
420421
for p in pars :
421422
if key == p.GetName() : return p
422423

423-
raise KeyError ( 'RooFitResult: invalid key %s ' % key )
424+
raise KeyError ( "RooFitResult: invalid key `%s`" % key )
424425

425426
# ===========================================================================
426427
## get correct estimate of sum of two (or more) variables,

0 commit comments

Comments
 (0)