Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Fix typo "h.GetSumw2()" in _connect._root (h --> obj) #22

Merged
merged 1 commit into from
Jul 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/aghast/_connect/_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def to_root(obj, name):
slc.append(slice(None))
else:
raise AssertionError(type(axis.binning))

if isinstance(obj.axis[0].binning, FractionBinning):
raise NotImplementedError

Expand Down Expand Up @@ -164,7 +164,7 @@ def to_root(obj, name):
num, low, high = axissummary[0][1:]
out = cls(name, title, num, low, high)
xaxis = out.GetXaxis()

elif axissummary[0][0] is EdgesBinning:
edges = axissummary[0][1]
out = cls(name, title, len(edges) - 1, edges)
Expand Down Expand Up @@ -282,7 +282,7 @@ def from_root(obj, collection=False):
categories = None

if obj.GetSumw2N() != 0:
sumw2obj = h.GetSumw2()
sumw2obj = obj.GetSumw2()
sumw2array = getbincontents(sumw2obj)
if categories is not None:
sumwarray = sumwarray[1 : len(categories) + 1]
Expand Down