Skip to content

Commit

Permalink
drop use of awkward in cabientry
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-held committed Jul 5, 2023
1 parent 7b9b6af commit d3e80fd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/cabinetry/tabulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pathlib
from typing import Any, Dict, List, Optional, Union

import awkward as ak
import numpy as np
import pyhf
import tabulate
Expand Down Expand Up @@ -285,9 +284,12 @@ def yields(

if per_channel:
# yields per channel
model_yields_per_channel = np.sum(
ak.from_iter(model_prediction.model_yields), axis=-1
).tolist()
n_channels = len(model_prediction.model.config.channels)
model_yields_per_channel = [
np.sum(model_prediction.model_yields[i_chan], axis=-1).tolist()
for i_chan in range(n_channels)
]

data_per_channel = [sum(d) for d in data_yields]
per_channel_table = _yields_per_channel(
model_prediction.model,
Expand Down

0 comments on commit d3e80fd

Please # to comment.