From 848c7cdce99cedc3d786df53173d635787fe775e Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 16 Nov 2020 08:19:38 -0600 Subject: return np.inf if parameters are out of bounds --- utils/chi2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/chi2') diff --git a/utils/chi2 b/utils/chi2 index 6dfd984..12b602a 100755 --- a/utils/chi2 +++ b/utils/chi2 @@ -211,7 +211,7 @@ def make_nll(data, muons, mc, atmo_scale_factor, muon_scale_factor, bins, print_ data_hists = get_data_hists(data,bins) def nll(x, grad=None): - if any(x[i] < 0 for i in (0,2,4,5)): + if (x < PRIORS_LOW).any() or (x > PRIORS_HIGH).any(): return np.inf # Get the Monte Carlo histograms. We need to do this within the -- cgit