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

Before Change


    input_wt_mtch_sum = []
    for i in _pycompat.irange(input.ndim):
        sl = input.ndim * [None]
        sl[i] = slice(None)
        sl = tuple(sl)

        input_i = dask.array.arange(input.shape[i], chunks=input.chunks[i])
        input_wt = input * input_i[sl]

After Change


    )
    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: 3

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: explosion/thinc
Commit Name: 6799144620411f23c3a15abae1f78c5bc2a4f7c0
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: pad


Project Name: explosion/thinc
Commit Name: 2eef369b7ac92e38f81819307a4af4238fd953ee
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/jax_ops.py
Class Name: JaxOps
Method Name: pad