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: 6
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: jakeret/tf_unet
Commit Name: 6ff96d4f10e2e85d0cb9745776eac64713c51256
Time: 2016-08-24
Author: jakeret@phys.ethz.ch
File Name: tf_unet/unet.py
Class Name: Unet
Method Name: __init__
Project Name: dask/dask-image
Commit Name: cbbcea8795e8da754a5b3ffb1a08ef66afd84eef
Time: 2018-09-02
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/_utils.py
Class Name:
Method Name: _ravel_shape_indices