Skip to content

[Python][UHI] Incorrect number of entries reported in TH1 after slicing #19113

@siliataider

Description

@siliataider

Check duplicate issues.

  • Checked for duplicates

Description

When setting bin contents of a histogram using ROOT's UHI, the number of entries (TH1::GetEntries()) is calculated incorrectly.

Reproducer

import ROOT

h = ROOT.TH1D("h", "h", 10, 0, 1)
h[...] = 1.
h.Print()

Expected

TH1.Print Name  = h, Entries= 10, Total sum= 10

Got

TH1.Print Name  = h, Entries= 20, Total sum= 10

ROOT version

6.36

Installation method

al

Operating system

al

Additional context

No response

Metadata

Metadata

Assignees

Type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions