d55bad55b6a9e97f800c97c73038bc5ed8d4b31f,arviz/data/io_pystan.py,PyStanConverter,prior_to_xarray,#PyStanConverter#,201
Before Change
nchain = self.fit.sim["chains"]
data = {}
for key, values in self.prior.items():
if len(values.shape) == 0:
values = np.atleast_2d(values)
elif len(values.shape) == 1:
if nchain == 1:
values = np.expand_dims(values, -1)
else:
values = np.expand_dims(values, 0)
values = np.swapaxes(values, 0, 1)
data[key] = values
return dict_to_dataset(data, library=self.pystan, coords=self.coords, dims=self.dims)
After Change
prior = self.prior
// filter posterior_predictive and log_likelihood
prior_predictive = self.prior_predictive
if prior_predictive is None:
prior_predictive = []
elif isinstance(prior_predictive, str):
prior_predictive = [prior_predictive]
ignore = prior_predictive + ["lp__"]
data = get_draws(prior, ignore=ignore)
return dict_to_dataset(data, library=self.pystan, coords=self.coords, dims=self.dims)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: arviz-devs/arviz
Commit Name: d55bad55b6a9e97f800c97c73038bc5ed8d4b31f
Time: 2018-11-03
Author: ahartikainen@users.noreply.github.com
File Name: arviz/data/io_pystan.py
Class Name: PyStanConverter
Method Name: prior_to_xarray
Project Name: elfi-dev/elfi
Commit Name: 55bd09be272701797abcf9e549fffe8b0311e387
Time: 2017-03-28
Author: jarno.lintusaari@aalto.fi
File Name: elfi/bo/gpy_model.py
Class Name: GPyRegression
Method Name: evaluate
Project Name: elfi-dev/elfi
Commit Name: 81db009a1cc919bfda48bb923e3caa70c1dfeb9e
Time: 2016-11-14
Author: antti.kangasraasio@hiit.fi
File Name: elfi/bo/gpy_model.py
Class Name: GPyModel
Method Name: _check_input
Project Name: metric-learn/metric-learn
Commit Name: 85185175f356697f4a91feacaed2d3a9d70af95f
Time: 2019-06-12
Author: 31916524+wdevazelhes@users.noreply.github.com
File Name: metric_learn/rca.py
Class Name: RCA
Method Name: fit