e21353e209a2d00c004e4f3b61b112dcffb4df6e,Orange/widgets/utils/domaineditor.py,DomainEditor,get_domain,#DomainEditor#Any#Any#,193

Before Change


            if orig_plc == Place.meta:
                col_data = list(chain(*data[:, orig_var].metas))
            else:
                col_data = list(chain(*data[:, orig_var]))
            if name == orig_var.name and tpe == type(orig_var):
                var = orig_var
            elif tpe == DiscreteVariable:
                values = list(str(i) for i in set(col_data) if not is_missing(i))

After Change


                col_data = data[:, orig_var].Y
            else:
                col_data = data[:, orig_var].X
            col_data = col_data.ravel()
            if name == orig_var.name and tpe == type(orig_var):
                var = orig_var
            elif tpe == type(orig_var):
                // change the name so that all_vars will get the correct name
                orig_var.name = name
                var = orig_var
            elif tpe == DiscreteVariable:
                values = list(str(i) for i in np.unique(col_data) if not is_missing(i))
                var = tpe(name, values)
                col_data = [np.nan if is_missing(x) else values.index(str(x))
                            for x in col_data]
            elif tpe == StringVariable and type(orig_var) == DiscreteVariable:
                var = tpe(name)
                col_data = [orig_var.repr_val(x) if not np.isnan(x) else ""
                            for x in col_data]
            else:
                var = tpe(name)
            places[place].append(var)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: biolab/orange3
Commit Name: e21353e209a2d00c004e4f3b61b112dcffb4df6e
Time: 2017-02-03
Author: anze.staric@gmail.com
File Name: Orange/widgets/utils/domaineditor.py
Class Name: DomainEditor
Method Name: get_domain


Project Name: biolab/orange3
Commit Name: 8bccce2a53e553c0d033be7820e5a69902b26c3d
Time: 2017-01-20
Author: marko.toplak@gmail.com
File Name: Orange/widgets/utils/domaineditor.py
Class Name: DomainEditor
Method Name: get_domain


Project Name: biolab/orange3
Commit Name: e21353e209a2d00c004e4f3b61b112dcffb4df6e
Time: 2017-02-03
Author: anze.staric@gmail.com
File Name: Orange/widgets/utils/domaineditor.py
Class Name: DomainEditor
Method Name: get_domain


Project Name: PyMVPA/PyMVPA
Commit Name: f1d3a5d5fb4a319d25b9079e1ba1dad17f3d80bd
Time: 2012-11-14
Author: nikolaas.oosterhof@unitn.it
File Name: mvpa2/misc/surfing/volume_mask_dict.py
Class Name: VolumeMaskDictionary
Method Name: add