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

Before Change


        dimensions, dtype=dtype, chunks=chunks
    )

    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



    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: rail-berkeley/softlearning
Commit Name: f72e15a379f3e1541e42f8fc574fb7373d8527bf
Time: 2018-10-23
Author: hartikainen@berkeley.edu
File Name: softlearning/algorithms/diayn.py
Class Name: DIAYN
Method Name: __init__


Project Name: geomstats/geomstats
Commit Name: a2e39e8a3c0586ce0c1cca407d1738565a75e705
Time: 2020-01-16
Author: ninamio78@gmail.com
File Name: geomstats/backend/pytorch_random.py
Class Name:
Method Name: choice