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])
    return triang1 == triang2

After Change


    triangles2 = vertices2[np.array(faces2)]
    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():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

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: pantsbuild/pants
Commit Name: 6229c419d8f1b63cac22f23f24e19ef28d89b0a3
Time: 2018-06-27
Author: dawagner@gmail.com
File Name: src/python/pants/backend/graph_info/tasks/cloc.py
Class Name: CountLinesOfCode
Method Name: console_output


Project Name: dit/dit
Commit Name: d68d2f5d0cc7a5520081ef2eb67db816c2bf9550
Time: 2013-10-06
Author: chebee7i@gmail.com
File Name: dit/npdist.py
Class Name: Distribution
Method Name: __init__


Project Name: stanford-mast/nn_dataflow
Commit Name: aeff109058b43a6c854621743ab7aaced5469130
Time: 2017-06-28
Author: mgao12@stanford.edu
File Name: nn_dataflow/LoopBlocking.py
Class Name:
Method Name: skip