783c109c591c6a3affc750d29c9d56f86c1ed6cb,dask_image/ndmeasure/_utils.py,,_ravel_shape_indices,#,53
Before Change
Gets the raveled indices shaped like input.
indices = sum([
dask.array.arange(
0,
numpy.prod(dimensions[i:], dtype=dtype),
numpy.prod(dimensions[i + 1:], dtype=dtype),
dtype=dtype,
chunks=c
)[i * (None,) + (slice(None),) + (len(dimensions) - i - 1) * (None,)]
for i, c in enumerate(chunks)
])
return indices
After Change
for i, c in enumerate(chunks)
]
indices = dask.array.atop(
_ravel_shape_indices_kernel, tuple(range(len(indices))),
*sum([(a, (i,)) for i, a in enumerate(indices)], tuple()),
dtype=dtype
)
return indices
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: dask/dask-image
Commit Name: 783c109c591c6a3affc750d29c9d56f86c1ed6cb
Time: 2018-09-29
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/_utils.py
Class Name:
Method Name: _ravel_shape_indices
Project Name: deepmind/ai-safety-gridworlds
Commit Name: c43cb31143431421b5d2b661a2458efb301da9a3
Time: 2020-10-13
Author: miljanm@google.com
File Name: ai_safety_gridworlds/environments/side_effects_sokoban.py
Class Name: BoxSprite
Method Name: _calculate_wall_penalty
Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 012daf57ac31d82366323e7ec27ab7c2cb678a09
Time: 2018-05-27
Author: eriklindernoren@gmail.com
File Name: utils.py
Class Name:
Method Name: non_max_suppression