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)