16861063909843a9e9cdae82c35b1acf2708278c,python/dgl/view.py,HeteroNodeDataView,__repr__,#HeteroNodeDataView#,110

Before Change



    def __repr__(self):
        if isinstance(self._ntype, list):
            ret = {}
            for (i, ntype) in enumerate(self._ntype):
                data = self._graph._get_n_repr(self._ntid[i], self._nodes)
                value = {key : data[key]
                         for key in self._graph._node_frames[self._ntid[i]]}
                ret[ntype] = value
            return repr(ret)
        else:
            data = self._graph._get_n_repr(self._ntid, self._nodes)
            return repr({key : data[key]

After Change



    def __repr__(self):
        if isinstance(self._ntype, list):
            ret = defaultdict(dict)
            for (i, ntype) in enumerate(self._ntype):
                data = self._graph._get_n_repr(self._ntid[i], self._nodes)
                for key in self._graph._node_frames[self._ntid[i]]:
                    ret[key][ntype] = data[key]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dmlc/dgl
Commit Name: 16861063909843a9e9cdae82c35b1acf2708278c
Time: 2021-02-24
Author: coin2028@hotmail.com
File Name: python/dgl/view.py
Class Name: HeteroNodeDataView
Method Name: __repr__


Project Name: dmlc/dgl
Commit Name: 16861063909843a9e9cdae82c35b1acf2708278c
Time: 2021-02-24
Author: coin2028@hotmail.com
File Name: python/dgl/view.py
Class Name: HeteroEdgeDataView
Method Name: __repr__


Project Name: scikit-optimize/scikit-optimize
Commit Name: 45ffcc4d387da3e767ea675640f411dbea349ff0
Time: 2017-06-28
Author: iaroslav.email@gmail.com
File Name: skopt/wrappers/scikit_learn.py
Class Name: SkoptSearchCV
Method Name: __init__