Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Mar 18, 2024
1 parent a72ada3 commit 67d8654
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 4 additions & 1 deletion ReleaseNotes/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## New features

1. improve prints from `PDF.load_params`
1. add `smooth` function for 1D-histogram
1. imporove `rebin*` functoions for 1D-histograms

## Backward incompatible

## Bug fixes
Expand Down
9 changes: 3 additions & 6 deletions ostap/histos/histos.py
Original file line number Diff line number Diff line change
Expand Up @@ -4922,11 +4922,6 @@ def _bin_overlap_2D_ ( x1 , y1 , x2 , y2 ) :
return ( xmax - xmin ) * ( ymax - ymin ) / ( 4.0 * x1e * y1e )




## print ('QUQUQU!!')


# ==============================================================================
## rebin 1D-histogram with NUMBERS
def _rebin_nums_1D_ ( h1 , template ) :
Expand All @@ -4946,7 +4941,8 @@ def _rebin_nums_1D_ ( h1 , template ) :
3 == len ( template ) and \
isinstance ( template [0] , integer_types ) and 1 < template [0] and \
isinstance ( template [1] , num_types ) and \
isinstance ( template [2] , num_types ) and template [ 1] < template [ 2 ] :
isinstance ( template [2] , num_types ) and template [ 1] < template [ 2 ] :
htype = ROOT.TH1D if isinstance ( h1 , ROOT.TH1D ) else ROOT.TH1F
template = htype ( hID() , 'template' , template , xaxis.GetXmin() , xaxis.GetXmax() )

# clone it!
Expand Down Expand Up @@ -4993,6 +4989,7 @@ def _rebin_func_1D_ ( h1 , template ) :
isinstance ( template [0] , integer_types ) and 1 < template [0] and \
isinstance ( template [1] , num_types ) and \
isinstance ( template [2] , num_types ) and template [ 1] < template [ 2 ] :
htype = ROOT.TH1D if isinstance ( h1 , ROOT.TH1D ) else ROOT.TH1F
template = htype ( hID() , 'template' , template , xaxis.GetXmin() , xaxis.GetXmax() )

# clone it!
Expand Down

0 comments on commit 67d8654

Please sign in to comment.