scikit-hep/hist

[BUG] subtraction broadcast only works in one direction

andrzejnovak opened this issue · 0 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'