6e2edba07d8c78ebe96afdafdd93ed109091cfd9,elfi/methods/methods.py,Rejection,extract_result,#Rejection#,480

Before Change


        // Take out the correct number of samples
        samples = dict()
        for k, v in self.state["samples"].items():
            samples[k] = v[:self.objective["n_samples"]]

        result = self.state.copy()
        result["samples"] = samples
        result["n_samples"] = self.objective["n_samples"]

After Change


        samples = [self.state["samples"][p][:n_samples]
                   for p in self.outputs]

        result = Result(samples_list=samples,
                        names=self.outputs,
                        name_distance=self.discrepancy,
                        threshold=self.state["threshold"],
                        n_sim=self.state["n_sim"],
                        accept_rate=self.state["accept_rate"]
                        )

        return result

    def _init_samples_lazy(self, batch):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: elfi-dev/elfi
Commit Name: 6e2edba07d8c78ebe96afdafdd93ed109091cfd9
Time: 2017-04-24
Author: henri.vuollekoski@aalto.fi
File Name: elfi/methods/methods.py
Class Name: Rejection
Method Name: extract_result


Project Name: Netflix/vmaf
Commit Name: 306ed96034372cea725ceaa60e5ee177a7a6ce37
Time: 2016-02-24
Author: zli@netflix.com
File Name: python/quality_runner.py
Class Name: VmafQualityRunner
Method Name: _run_on_asset


Project Name: Netflix/vmaf
Commit Name: 306ed96034372cea725ceaa60e5ee177a7a6ce37
Time: 2016-02-24
Author: zli@netflix.com
File Name: python/quality_runner.py
Class Name: VmaftQualityRunner
Method Name: _run_on_asset