cbbcea8795e8da754a5b3ffb1a08ef66afd84eef,dask_image/ndmeasure/_utils.py,,_ravel_shape_indices,#,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)

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

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: librosa/librosa
Commit Name: e949a7462a0552c36e13f5d0d9147c4fc52cee32
Time: 2015-08-14
Author: brian.mcfee@nyu.edu
File Name: librosa/feature/utils.py
Class Name:
Method Name: sync


Project Name: dask/dask-image
Commit Name: cbbcea8795e8da754a5b3ffb1a08ef66afd84eef
Time: 2018-09-02
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: center_of_mass