scikit-hep / hist

Histogramming for analysis powered by boost-histogram

Home Page:https://hist.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] subtraction broadcast only works in one direction

andrzejnovak opened this issue · comments

Asking for

h = hist.new.Reg(10, 0, 10, name='x', flow=False).Double().fill(np.random.normal(5, 3, 1000))
(h - 100).plot()

behaves as expected with negative bins, while

h = hist.new.Reg(10, 0, 10, name='x', flow=False).Double().fill(np.random.normal(5, 3, 1000))
(100 - h).plot()

throws TypeError: unsupported operand type(s) for -: 'int' and 'Hist'