b7ca885dd1148a94c13e87789d5a5947eaedfc37,dask_image/ndmeasure/__init__.py,,histogram,#,141

Before Change


    max = int(max)
    bins = int(bins)

    lbl_mtch = _utils._get_label_matches(labels, index)

    index_ranges = [_pycompat.irange(e) for e in index.shape]

    result = numpy.empty(index.shape, dtype=object)
    for i in itertools.product(*index_ranges):
        result[i] = _utils._histogram(
            input[lbl_mtch[i]], min, max, bins
        )
    result = result[()]

After Change


    max = int(max)
    bins = int(bins)

    func = functools.partial(_utils._histogram, min=min, max=max, bins=bins)
    result = labeled_comprehension(input, labels, index, func, object, None)

    return result

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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


Project Name: dask/dask-image
Commit Name: 1a78285cd53a5988ee638937842246aa537bb576
Time: 2019-02-13
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: label


Project Name: SheffieldML/GPy
Commit Name: 8b621a409cd07d0f5610a2648b6413322c39a822
Time: 2017-08-10
Author: akash.dhaka@aalto.fi
File Name: GPy/likelihoods/likelihood.py
Class Name: Likelihood
Method Name: ep_gradients