862c3ed042ada33d2824e67e47bd92ef0881cf00,cellprofiler/modules/relateobjects.py,RelateObjects,calculate_minimum_distances,#RelateObjects#Any#Any#,451

Before Change


        else:
            mask = parents_of > 0

            ccenters = centrosome.cpmorphology.centers_of_labels(children.segmented).transpose()

            ccenters = ccenters[mask, :]

            parents_of_masked = parents_of[mask] - 1

            pperim = centrosome.outline.outline(parents.segmented)

            // Get a list of all points on the perimeter
            perim_loc = numpy.argwhere(pperim != 0)

            // Get the label // for each point
            perim_idx = pperim[perim_loc[:, 0], perim_loc[:, 1]]

            // Sort the points by label //
            idx = numpy.lexsort((perim_loc[:, 1], perim_loc[:, 0], perim_idx))

            perim_loc = perim_loc[idx, :]

            perim_idx = perim_idx[idx]

            // Get counts and indexes to each run of perimeter points
            counts = centrosome.cpmorphology.fixup_scipy_ndimage_result(
                scipy.ndimage.sum(
                    numpy.ones(len(perim_idx)),
                    perim_idx,

After Change


            // Sort the points by label //
            reverse_column_order = range(children.dimensions)[::-1]

            coordinates = perim_loc[:, reverse_column_order].transpose().tolist()

            coordinates.append(perim_idx)

            idx = numpy.lexsort(coordinates)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: CellProfiler/CellProfiler
Commit Name: 862c3ed042ada33d2824e67e47bd92ef0881cf00
Time: 2017-04-19
Author: mcquin@users.noreply.github.com
File Name: cellprofiler/modules/relateobjects.py
Class Name: RelateObjects
Method Name: calculate_minimum_distances


Project Name: GPflow/GPflow
Commit Name: 956ac38fd58a1ef65c18dffc06a22d2e628e3a16
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: GPflow/conditionals.py
Class Name:
Method Name: gaussian_gp_predict


Project Name: GPflow/GPflow
Commit Name: 956ac38fd58a1ef65c18dffc06a22d2e628e3a16
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: GPflow/conditionals.py
Class Name:
Method Name: gaussian_gp_predict_whitened