From 4f98bf7d2fcf2f2ec694d2b92cae3e53c1b8e99b Mon Sep 17 00:00:00 2001 From: Lukas Heinrich Date: Tue, 13 Oct 2020 23:44:56 +0200 Subject: [PATCH] build --- src/pyhf/workspace.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/pyhf/workspace.py b/src/pyhf/workspace.py index 9044320dcb..d36190c6e8 100644 --- a/src/pyhf/workspace.py +++ b/src/pyhf/workspace.py @@ -744,7 +744,6 @@ def sorted(cls, workspace): return cls(newspec) -<<<<<<< HEAD @classmethod def build(cls, model, data, name='measurement'): """ @@ -768,28 +767,3 @@ def build(cls, model, data, name='measurement'): for k in model.config.channels ] return cls(workspace) -======= - -def build(model, data, name='measurement'): - """ - Build a workspace from model and data. - - Args: - model (~pyhf.pdf.Model): A model to store into a workspace - model (tensor): A array holding observations to store into a workspace - - Returns: - ~pyhf.workspace.Workspace: A new workspace object - - """ - workspace = dict(channels=copy.deepcopy(model.spec['channels'])) - workspace['version'] = utils.SCHEMA_VERSION - workspace['measurements'] = [ - {'name': name, 'config': {'poi': model.config.poi_name, 'parameters': []}} - ] - workspace['observations'] = [ - {'name': k, 'data': data[model.config.channel_slices[k]]} - for k in model.config.channels - ] - return workspace ->>>>>>> 6af2f85ad5d82999c7d78822205d854392633dfe