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



    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: 3

Non-data size: 3

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: explosion/thinc
Commit Name: 8b9e1e96fa0b35dc25054ada60748de4c3682218
Time: 2017-01-03
Author: honnibal+gh@gmail.com
File Name: thinc/neural/base.py
Class Name: Model
Method Name: size


Project Name: pymc-devs/pymc3
Commit Name: 52d2340cb3074d848125722e411c1ba69fd08174
Time: 2017-07-16
Author: adrian.seyboldt@gmail.com
File Name: pymc3/step_methods/hmc/base_hmc.py
Class Name: BaseHMC
Method Name: __init__