c4270b5d7d45f19278f3130ef83404fc688a7d2f,arviz/utils/xarray_utils.py,PyStanConverter,posterior_predictive_to_xarray,#PyStanConverter#,474

Before Change


    def posterior_predictive_to_xarray(self):
        Convert posterior_predictive samples to xarray.
        if isinstance(self.posterior_predictive, dict):
            data = {k : np.swapaxes(v, 0, 1)
                    for k, v in self.posterior_predictive.items()}
        else:
            dtypes = self.infer_dtypes()
            data = {}
            var_dict = self.fit.extract(self.posterior_predictive, dtypes=dtypes, permuted=False)

After Change


    def posterior_predictive_to_xarray(self):
        Convert posterior_predictive samples to xarray.
        if isinstance(self.posterior_predictive, dict):
            data = {}
            for key, values in self.posterior_predictive.items():
                if len(values.shape) == 1:
                    values = np.expand_dims(values, -1)
                values = np.swapaxes(values, 0, 1)
                data[key] = values
        else:
            dtypes = self.infer_dtypes()
            data = {}
            var_dict = self.fit.extract(self.posterior_predictive, dtypes=dtypes, permuted=False)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 14

Instances


Project Name: arviz-devs/arviz
Commit Name: c4270b5d7d45f19278f3130ef83404fc688a7d2f
Time: 2018-09-13
Author: ahartikainen@users.noreply.github.com
File Name: arviz/utils/xarray_utils.py
Class Name: PyStanConverter
Method Name: posterior_predictive_to_xarray


Project Name: arviz-devs/arviz
Commit Name: c4270b5d7d45f19278f3130ef83404fc688a7d2f
Time: 2018-09-13
Author: ahartikainen@users.noreply.github.com
File Name: arviz/utils/xarray_utils.py
Class Name: PyStanConverter
Method Name: prior_to_xarray


Project Name: NifTK/NiftyNet
Commit Name: acddf04b125d567e3d1954d26f6b4c2042e50e52
Time: 2019-07-03
Author: carole.sudre@kcl.ac.uk
File Name: niftynet/io/image_sets_partitioner.py
Class Name: ImageSetsPartitioner
Method Name: initialise


Project Name: NifTK/NiftyNet
Commit Name: 1ef746a1b78c3964a317adf6511279ab106fcb87
Time: 2019-06-05
Author: carole.sudre@kcl.ac.uk
File Name: niftynet/io/image_sets_partitioner.py
Class Name: ImageSetsPartitioner
Method Name: initialise