Skip to content

[BUG] Throw error when filling Int64 with negative weight #618

@andrzejnovak

Description

@andrzejnovak
import numpy as np
import hist

h = hist.Hist.new.Reg(50, -5, 5).Int64().fill(np.random.randn(100))
h.fill(3, weight=-1)
h.plot();

image

Filling negative weights to the wrong storage type gives a silent error. This should either give a warning or just not be allowed at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions