b470898504d2a077433a84e12a7c8078b2494760,dask_image/ndmeasure/__init__.py,,maximum_position,#Any#Any#Any#,366

Before Change


    )

    if not max_1dpos_lbl.ndim:
        max_1dpos_lbl = max_1dpos_lbl[None]

    max_pos_lbl = _utils._unravel_index(max_1dpos_lbl, input.shape)

    if index.shape == tuple():

After Change


    if index.shape:
        index = index.flatten()

    out_dtype = numpy.dtype([("pos", int, (input.ndim,))])
    default_1d = numpy.zeros((1,), dtype=out_dtype)

    func = functools.partial(
        _utils._argmax, shape=input.shape, dtype=out_dtype
    )
    max_pos_lbl = labeled_comprehension(
        input, labels, index,
        func, out_dtype, default_1d[0], pass_positions=True
    )
    max_pos_lbl = max_pos_lbl["pos"]

    if index.shape == tuple():
        max_pos_lbl = dask.array.squeeze(max_pos_lbl)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: dask/dask-image
Commit Name: b470898504d2a077433a84e12a7c8078b2494760
Time: 2018-10-01
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: maximum_position


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: dask/dask-image
Commit Name: b470898504d2a077433a84e12a7c8078b2494760
Time: 2018-10-01
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: minimum_position