cbbcea8795e8da754a5b3ffb1a08ef66afd84eef,dask_image/ndmeasure/_utils.py,,_ravel_shape_indices,#Any#Any#Any#,54
Before Change
dtype = numpy.dtype(dtype)
indices = _compat._indices(
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)
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
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
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: idaholab/raven
Commit Name: 438b2a63d195c8f5ccecae35d577d8bfde354406
Time: 2020-08-22
Author: mohammad.abdo@inl.gov
File Name: framework/Optimizers/GeneticAlgorithm.py
Class Name: GeneticAlgorithm
Method Name: _useRealization
Project Name: tyarkoni/pliers
Commit Name: 005968dcfbd2a8f70d8ea3957c8abba60a12492d
Time: 2018-05-15
Author: quinten.mcnamara@gmail.com
File Name: pliers/filters/video.py
Class Name: FrameSamplingFilter
Method Name: _filter
Project Name: idaholab/raven
Commit Name: fcb05df08ef25ee5d9e5f015335d64fdd156bf38
Time: 2020-11-09
Author: mohammad.abdo@inl.gov
File Name: framework/Optimizers/mutators/mutators.py
Class Name:
Method Name: swapMutator