Root TH2 GetBinErrorUp(bin) not exposed to pyroot

Dear all,

When testing a script in pyroot, I cannot use TH2::GetBinErrorUp(bin), as only TH2::GetBinErrorUp(binx,biny) is exposed to pyroot.

Python 3.7.2 (default, Jan 13 2019, 12:50:01) 
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT as R
>>> h = R.TH2D("h","h",100,0,1,100,0,1)
>>> h.GetBinErrorUp(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: double TH2::GetBinErrorUp(int binx, int biny) =>
    takes at least 2 arguments (1 given)
  | Welcome to ROOT 6.16/00         |
  |                               (c) 1995-2018, The ROOT Team |
  | Built for macosx64 on Apr 15 2019, 16:39:31                |
  | From tags/v6-16-00@v6-16-00                                |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |

root [1] TH2D h
(TH2D &) Name:  Title:  NbinsX: 1
root [2] h.GetBinErrorUP
root [2] h.GetBinErrorUp([tab]
Double_t GetBinErrorUp(Int_t bin) const
Double_t GetBinErrorUp(Int_t binx, Int_t biny)
root [2] h.GetBinErrorUp(1)
(double) 0.0000000

I think this is a bug?

_ROOT Version: 6.16/00
tested on both lxplus-centos7 and macOS 10.14.4

1 Like

Dear Adam,

Yes, this looks like a bug in the overload resolution, thank you for reporting.

I just opened this ticket to follow the issue:


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.