f4f05107e7f13bcbe5749f7531fd31580c571ed1,skimage/measure/tests/test_marching_cubes.py,,_same_mesh,#Any#Any#Any#Any#,114

Before Change



def _same_mesh(vertices1, faces1, vertices2, faces2):
    faces1 = [sorted(f) for f in faces1]
    faces2 = [sorted(f) for f in faces2]
    triangles1 = vertices1[np.array(faces1)]
    triangles2 = vertices2[np.array(faces2)]
    triang1 = set([tuple(t.flat) for t in triangles1])
    triang2 = set([tuple(t.flat) for t in triangles2])

After Change


    triang1 = [np.concatenate(sorted(t, key=lambda x:tuple(x))) for t in triangles1]
    triang1 = set([tuple([rounder(i) for i in t]) for t in triang1])
    triang2 = [np.concatenate(sorted(t, key=lambda x:tuple(x))) for t in triangles2]
    triang2 = set([tuple([rounder(i) for i in t]) for t in triang2])
    return triang1 == triang2

def test_both_algs_same_result_donut():
    // Performing this test on data that does not have ambiguities
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: scikit-image/scikit-image
Commit Name: f4f05107e7f13bcbe5749f7531fd31580c571ed1
Time: 2016-07-25
Author: almar.klein@gmail.com
File Name: skimage/measure/tests/test_marching_cubes.py
Class Name:
Method Name: _same_mesh


Project Name: CamDavidsonPilon/lifelines
Commit Name: b1d839cb8e521c3cf2efaebe17082f1a9680a253
Time: 2020-05-13
Author: cam.davidson.pilon@gmail.com
File Name: experiments/working_npmle.py
Class Name:
Method Name: create_turnball_intervals


Project Name: RaRe-Technologies/gensim
Commit Name: 3e2ebf76a530eca5305d1feba6be9c531ee33d71
Time: 2012-08-19
Author: radimrehurek@seznam.cz
File Name: gensim/corpora/hashdictionary.py
Class Name: HashDictionary
Method Name: filter_extremes