Skip to content

Commit 0eef303

Browse files
HDembinskihenryiii
authored andcommitted
add a test
1 parent 7b98640 commit 0eef303

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_storage.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,12 @@ def test_non_uniform_rebin_with_weights():
392392
[1.0, 1.05, 1.15, 3.0],
393393
)
394394
)
395+
396+
397+
def test_multi_weight():
398+
x = np.array([1, 2])
399+
weights = np.array([[1, 2, 3], [4, 5, 6]])
400+
h = bh.Histogram(bh.axis.Regular(5, 0, 5), storage=bh.storage.MultiWeight(3))
401+
h.fill(x, sample=weights)
402+
assert_array_equal(h[1], [1, 2, 3])
403+
assert_array_equal(h[2], [4, 5, 6])

0 commit comments

Comments
 (0)