60fe2731859d44ad2d94b6699682e077c221bd19,kmodes/util/__init__.py,,get_unique_rows,#Any#,52

Before Change



def get_unique_rows(a):
    Gets the unique rows in a numpy array.
    b = np.ascontiguousarray(a).view(
        np.dtype((np.void, a.dtype.itemsize * a.shape[1])))
    _, idx = np.unique(b, return_index=True)
    return a[idx]

After Change



def get_unique_rows(a):
    Gets the unique rows in a numpy array.
    return np.vstack({tuple(row) for row in a})
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: nicodv/kmodes
Commit Name: 60fe2731859d44ad2d94b6699682e077c221bd19
Time: 2016-06-16
Author: nico.devos@autogrid.com
File Name: kmodes/util/__init__.py
Class Name:
Method Name: get_unique_rows


Project Name: nicodv/kmodes
Commit Name: 60fe2731859d44ad2d94b6699682e077c221bd19
Time: 2016-06-16
Author: nico.devos@autogrid.com
File Name: kmodes/util/__init__.py
Class Name:
Method Name: get_unique_rows


Project Name: scikit-image/scikit-image
Commit Name: b0b629c6be895dd6b301643daf5a3473ca28a714
Time: 2016-08-24
Author: juan.n@unimelb.edu.au
File Name: skimage/morphology/watershed.py
Class Name:
Method Name: watershed


Project Name: nipy/dipy
Commit Name: bf4a0a3bf7fc925d6c123a91765ea99ac315668b
Time: 2013-12-23
Author: mrbago@gmail.com
File Name: dipy/tracking/eudx.py
Class Name: EuDX
Method Name: __init__