42be11c7824427fb0a8490f3bcd635410ded57b3,trackpy/linking/find_link.py,FindLinker,get_relocate_candidates,#FindLinker#Any#,363

Before Change


        kdtree = cKDTree(coords / max_dist, 30)
        found = kdtree.query_ball_point((pos - origin) / max_dist, 1.)
        if len(found) > 0:
            coords = coords[list(set([i for sl in found for i in sl]))]
        else:
            return None, None

        // drop dimmer points that are closer than separation to each other

After Change


        pos_rescaled = self.hash.to_eucl(pos)
        coords_ok = []
        for coord, coord_rescaled in zip(coords, coords_rescaled):
            dists = np.sqrt(np.sum((coord_rescaled - pos_rescaled)**2, axis=1))
            if np.any(dists <= self.search_range):
                coords_ok.append(coord)
        if len(coords_ok) == 0:
            return None, None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: soft-matter/trackpy
Commit Name: 42be11c7824427fb0a8490f3bcd635410ded57b3
Time: 2017-07-27
Author: caspervdw@gmail.com
File Name: trackpy/linking/find_link.py
Class Name: FindLinker
Method Name: get_relocate_candidates


Project Name: etal/cnvkit
Commit Name: c034a486630d90544beb2f42cc05e796e2973138
Time: 2015-06-17
Author: eric.talevich@gmail.com
File Name: cnvlib/fix.py
Class Name:
Method Name: match_ref_to_probes


Project Name: bokeh/bokeh
Commit Name: 5ca53bb34ef70d9b05f9195d3090f320d7d2a73c
Time: 2017-07-19
Author: mattpap@gmail.com
File Name: bokeh/util/compiler.py
Class Name:
Method Name: bundle_models


Project Name: Theano/Theano
Commit Name: 6ec43120736e7fdeb010727e391fcd362cddf028
Time: 2017-03-14
Author: nouiz@nouiz.org
File Name: theano/scan_module/scan_op.py
Class Name:
Method Name: profile_printer