cbbcea8795e8da754a5b3ffb1a08ef66afd84eef,dask_image/ndmeasure/_utils.py,,_ravel_shape_indices,#Any#Any#Any#,54

Before Change


    )

    indices = list(indices)
    for i in _pycompat.irange(len(indices)):
        indices[i] *= dtype.type(numpy.prod(indices[i].shape[i + 1:]))
    indices = dask.array.stack(indices).sum(axis=0)

    return indices

After Change


    Gets the raveled indices shaped like input.
    

    indices = sum([
        dask.array.arange(
            0, numpy.prod(dimensions[i:]), numpy.prod(dimensions[i + 1:]),
            dtype=dtype, chunks=c
        )[i * (None,) + (slice(None),) + (len(dimensions) - i - 1) * (None,)]
        for i, c in enumerate(chunks)
    ])

    return indices

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


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


Project Name: NifTK/NiftyNet
Commit Name: 135a56e0935fbb04811f8ce7b9f514f498212f71
Time: 2018-07-25
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/crf.py
Class Name:
Method Name: ftheta


Project Name: dit/dit
Commit Name: ec37ae1150e707e48ffb3cb45c4a1f3d3a166914
Time: 2013-02-25
Author: chebee7i@gmail.com
File Name: dit/distconst.py
Class Name:
Method Name: uniform_joint_distribution


Project Name: pymc-devs/pymc3
Commit Name: 6148d1b5107a295310d06adbabff4dc6dee9d33e
Time: 2019-04-18
Author: fonnesbeck@gmail.com
File Name: pymc3/distributions/bound.py
Class Name: _Bounded
Method Name: _random