6b7ac72472c9d549dea45f35669e876c4c8ee2e9,arviz/data/io_pyro.py,PyroConverter,posterior_to_xarray,#PyroConverter#,50

Before Change


                samples = EmpiricalMarginal(
                    self.posterior, sites=var_name
                ).get_samples_and_weights()[0]
                samples = samples.numpy().squeeze()
                data[var_name] = utils.expand_dims(samples)
        return dict_to_dataset(data, library=self.pyro, coords=self.coords, dims=self.dims)

    def observed_data_to_xarray(self):
        Convert observed data to xarray.

After Change


    def posterior_to_xarray(self):
        Convert the posterior to an xarray dataset.
        data = self.posterior.get_samples(group_by_chain=True)
        data = {k: v.detach().cpu().numpy() for k, v in data.items()}
        return dict_to_dataset(data, library=self.pyro, coords=self.coords, dims=self.dims)

    @requires("posterior")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: arviz-devs/arviz
Commit Name: 6b7ac72472c9d549dea45f35669e876c4c8ee2e9
Time: 2019-10-31
Author: fehiepsi@gmail.com
File Name: arviz/data/io_pyro.py
Class Name: PyroConverter
Method Name: posterior_to_xarray


Project Name: HyperGAN/HyperGAN
Commit Name: 365c861ccac7588596907b0cff8ddf69cc7a966c
Time: 2020-07-27
Author: mikkel@255bits.com
File Name: hypergan/samplers/grid_sampler.py
Class Name: GridSampler
Method Name: _sample


Project Name: tensorflow/agents
Commit Name: fe080ad28b3177ee1a861ba86bedababfc800ff7
Time: 2019-05-23
Author: aurelien.geron@gmail.com
File Name: tf_agents/environments/atari_preprocessing.py
Class Name: AtariPreprocessing
Method Name: _pool_and_resize