From 21238d979fccefe6b4fb45c59a640b5978cb9d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lukas=20Sp=C3=A4h?= Date: Thu, 31 Oct 2024 14:16:46 +0100 Subject: [PATCH] Fix Quadratic Scaling (docstring and allow pickle) (#1013) * Fix the docstring (EFT->QuadraticScaling, is the filename) and also allow_pickle=True for reading dicts from np gz * Depracating py2 for combine v10 (#1014) Remove py2.7 build in CI --------- Co-authored-by: Jonathon Langford <35494417+jonathon-langford@users.noreply.github.com> --- python/QuadraticScaling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/QuadraticScaling.py b/python/QuadraticScaling.py index 273659d01f1..83010411c6d 100644 --- a/python/QuadraticScaling.py +++ b/python/QuadraticScaling.py @@ -19,7 +19,7 @@ class Quadratic(PhysicsModel): >>> np.save('scales.npy', scales) Example for running: - text2workspace.py ttV.txt -P HiggsAnalysis.CombinedLimit.EFT:quad --PO scaling=scales.npy --PO process=ttZ --PO process=ttW --PO coefficient=cuW -o cuW.root + text2workspace.py ttV.txt -P HiggsAnalysis.CombinedLimit.QuadraticScaling:quad --PO scaling=scales.npy --PO process=ttZ --PO process=ttW --PO coefficient=cuW -o cuW.root combine -M MultiDimFit cuW.root --setParameterRanges=-4,4 """ @@ -37,7 +37,7 @@ def setPhysicsOptions(self, options): self.scaling = value def setup(self): - scaling = np.load(self.scaling)[()] + scaling = np.load(self.scaling, allow_pickle=True)[()] for process in self.processes: self.modelBuilder.out.var(process) name = "r_{0}_{1}".format(process, self.coefficient)