f9aea094643fb3240193b0bc0f1908d5b84d82ab,dask_image/ndmeasure/__init__.py,,center_of_mass,#Any#Any#Any#,24

Before Change



    input_wt_mtch_sum = dask.array.stack(input_wt_mtch_sum, axis=-1)

    com_lbl = input_wt_mtch_sum / input_mtch_sum[..., None]

    return com_lbl

After Change


    ])
    out_dtype = numpy.dtype(list(type_mapping.items()))

    default_1d = numpy.full((1,), numpy.nan, dtype=out_dtype)

    func = functools.partial(
        _utils._center_of_mass, shape=input.shape, dtype=out_dtype
    )
    com_lbl = labeled_comprehension(
        input, labels, index,
        func, out_dtype, default_1d[0], pass_positions=True
    )

    com_lbl = dask.array.stack([com_lbl[k] for k in type_mapping], axis=-1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dask/dask-image
Commit Name: f9aea094643fb3240193b0bc0f1908d5b84d82ab
Time: 2018-09-30
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: center_of_mass


Project Name: SPFlow/SPFlow
Commit Name: 10a2ef19ee3851f2bd5aa6bc1b9d9cee3b03e5f4
Time: 2018-12-06
Author: claas@voelcker.net
File Name: src/spn/structure/leaves/histogram/Gradients.py
Class Name:
Method Name: histogramm_gradient


Project Name: SPFlow/SPFlow
Commit Name: 10a2ef19ee3851f2bd5aa6bc1b9d9cee3b03e5f4
Time: 2018-12-06
Author: claas@voelcker.net
File Name: src/spn/structure/leaves/piecewise/Gradients.py
Class Name:
Method Name: piecewise_gradient