From 841dd008e2c27c91cb7e0d38b081d0f6eb79cd41 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Sun, 21 Oct 2018 12:31:14 -0700 Subject: [PATCH] change to len(...)-1 --- pyhf/modifiers/shapesys.py | 2 +- pyhf/modifiers/staterror.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyhf/modifiers/shapesys.py b/pyhf/modifiers/shapesys.py index 43e2c9d44b..67f42e55af 100644 --- a/pyhf/modifiers/shapesys.py +++ b/pyhf/modifiers/shapesys.py @@ -58,7 +58,7 @@ def __init__(self,shapesys_mods,pdfconfig,mega_mods): zero_mask = summed_mask == 0 # then apply the mask summed_mask[positive_mask] = inds - summed_mask[zero_mask] = 0 + summed_mask[zero_mask] = len(self._parindices) - 1 access_rows.append(summed_mask.tolist()) self._factor_access_indices = default_backend.tolist(default_backend.stack(access_rows)) self.finalize(pdfconfig) diff --git a/pyhf/modifiers/staterror.py b/pyhf/modifiers/staterror.py index 8408c0b378..7e9c9751c0 100644 --- a/pyhf/modifiers/staterror.py +++ b/pyhf/modifiers/staterror.py @@ -55,7 +55,7 @@ def __init__(self,staterr_mods,pdfconfig,mega_mods): zero_mask = summed_mask == 0 # then apply the mask summed_mask[positive_mask] = inds - summed_mask[zero_mask] = 0 + summed_mask[zero_mask] = len(self._parindices) - 1 access_rows.append(summed_mask.tolist()) self._factor_access_indices = default_backend.tolist(default_backend.stack(access_rows)) self.finalize(pdfconfig)