f9aea094643fb3240193b0bc0f1908d5b84d82ab,dask_image/ndmeasure/__init__.py,,center_of_mass,#Any#Any#Any#,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


    // This only matters if index is some array.
    index = index.T

    type_mapping = collections.OrderedDict([
        (("%i" % i), input.dtype) for i in _pycompat.irange(input.ndim)
    ])
    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
    )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 8

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: biolab/orange3
Commit Name: ecf4e9aaf32e15b5759375e0c50ba569f0dca042
Time: 2016-06-17
Author: niko.colneric@gmail.com
File Name: Orange/widgets/unsupervised/owdistances.py
Class Name:
Method Name:


Project Name: pytorch/pytorch
Commit Name: 64255294ba92089e2acabde78293e057a1c5d144
Time: 2021-03-08
Author: chenlai@fb.com
File Name: .circleci/cimodel/data/simple/macos_definitions.py
Class Name: MacOsJob
Method Name: gen_tree


Project Name: deepfakes/faceswap
Commit Name: 0e0b2faa1a205fe276a7c53bc600fca60b239234
Time: 2019-10-28
Author: vrooman.kyle@gmail.com
File Name: tools/sort.py
Class Name: Sort
Method Name: sort_face_yaw


Project Name: automl/SMAC3
Commit Name: f36de8ca06de91a3415ef9b87d4803f9095cd9cc
Time: 2015-12-03
Author: eggenspk@informatik.uni-freiburg.de
File Name: smac/smbo/intensification.py
Class Name: Intensifier
Method Name: intensify