def test_scale_flowbins():
w = 1e-2
x = np.random.normal(loc=0.4, scale=0.4, size=1000)
y = np.random.normal(loc=0.6, scale=0.4, size=1000)
h = bh.Histogram(
bh.axis.Regular(3, 0, 1),
bh.axis.Regular(3, 0, 1),
storage=bh.storage.Weight(),
)
h.fill(x, y, weight=w)
ref_value = np.array([h[bh.underflow, 0].value, h[1, 0].value, h[bh.overflow, 0].value])
h = h * 5
scale_value = np.array([h[bh.underflow, 0].value, h[1, 0].value, h[bh.overflow, 0].value])
return np.allclose(ref_value * 5 , scale_value)