f7e16c6997c76bd77c06ea0284a784e2ef029a5c,arviz/utils/xarray_utils.py,PyStanToNetCDF,default_varnames_coords_dims,#Any#Any#Any#,470

Before Change


            if varname not in dims:
                if len(vals.shape) == 1:
                    vals = np.expand_dims(vals, axis=1)
                vals = np.swapaxes(vals, 0, 1)
                shape_len = len(vals.shape)
                if shape_len == 2:
                    dims[varname] = []
                else:
                    dims[varname] = [
                        "{}_dim_{}".format(varname, idx)
                        for idx in range(1, shape_len-2+1)
                    ]

        return varnames, coords, dims

    def verify_coords_dims(self):
        Light checking and guessing on the structure of an xarray for a PyStan fit

After Change


            dims = {}
        for varname, dim in zip(obj.sim["pars_oi"], obj.sim["dims_oi"]):
            if varname not in dims:
                if varname == "lp__":
                    continue
                dims[varname] = [
                    "{}_dim_{}".format(varname, idx)
                    for idx in range(1, len(dim)+1)
                ]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: arviz-devs/arviz
Commit Name: f7e16c6997c76bd77c06ea0284a784e2ef029a5c
Time: 2018-08-27
Author: ari.hartikainen@aalto.fi
File Name: arviz/utils/xarray_utils.py
Class Name: PyStanToNetCDF
Method Name: default_varnames_coords_dims


Project Name: SPFlow/SPFlow
Commit Name: 6e70e10e8d5fe3d29d699741a274da1c597218cf
Time: 2018-09-05
Author: molina@cs.tu-darmstadt.de
File Name: src/spn/algorithms/StructureLearning.py
Class Name:
Method Name: learn_structure


Project Name: chainer/chainercv
Commit Name: 90b78b1379b3423aa3b4b5d0de7313f88bda23ab
Time: 2019-02-17
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/mask/mask_to_bbox.py
Class Name:
Method Name: mask_to_bbox