455ea48570f1af63b1270c8ccda49fbe3deb9bcc,python/dgl/utils.py,Index,__iter__,#Index#,23

Before Change


        self._dispatch(data)

    def __iter__(self):
        return iter(self.tolist())

    def __len__(self):
        if self._list_data is not None and isinstance(self._list_data, slice):
            slc = self._list_data

After Change


        self._dispatch(data)

    def __iter__(self):
        for i in self.tolist():
            yield int(i)

    def __len__(self):
        if self._list_data is not None and isinstance(self._list_data, slice):
            slc = self._list_data
            if slc.step is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dmlc/dgl
Commit Name: 455ea48570f1af63b1270c8ccda49fbe3deb9bcc
Time: 2018-12-04
Author: ly979@nyu.edu
File Name: python/dgl/utils.py
Class Name: Index
Method Name: __iter__


Project Name: biocore/scikit-bio
Commit Name: 7d15fc6d05587b5a1dfd676468748fdb55294d47
Time: 2015-03-26
Author: jai.rideout@gmail.com
File Name: skbio/sequence/_sequence.py
Class Name: Sequence
Method Name: __iter__


Project Name: soft-matter/trackpy
Commit Name: c6607119c25d0178245243ef3fdd3d176dd0d8f2
Time: 2020-01-22
Author: anntzer.lee@gmail.com
File Name: trackpy/linking/utils.py
Class Name:
Method Name: coords_from_df