b470898504d2a077433a84e12a7c8078b2494760,dask_image/ndmeasure/__init__.py,,minimum_position,#,515
Before Change
input, labels, index, _utils._argmin, int, 0, pass_positions=True
)
if not min_1dpos_lbl.ndim:
min_1dpos_lbl = min_1dpos_lbl[None]
min_pos_lbl = _utils._unravel_index(min_1dpos_lbl, input.shape)
if index.shape == tuple():
min_pos_lbl = dask.array.squeeze(min_pos_lbl)
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._argmin, shape=input.shape, dtype=out_dtype
)
min_pos_lbl = labeled_comprehension(
input, labels, index,
func, out_dtype, default_1d[0], pass_positions=True
)
min_pos_lbl = min_pos_lbl["pos"]
if index.shape == tuple():
min_pos_lbl = dask.array.squeeze(min_pos_lbl)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: minimum_position
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: suavecode/SUAVE
Commit Name: e73418dbc43053ccb522e94e9846de1c88667b73
Time: 2017-04-01
Author: ebotero@stanford.edu
File Name: trunk/SUAVE/Components/Energy/Networks/Propulsor_Surrogate.py
Class Name: Propulsor_Surrogate
Method Name: build_surrogate