b7efa1f037f8adc94a28fc421dd7934b63b3043e,geomstats/_backend/numpy/__init__.py,,assignment,#Any#Any#Any#Any#,121
Before Change
if not isinstance(values, list):
values = [values] * len(indices)
for nb_index, index in enumerate(indices):
if not isinstance(index, tuple):
index = (index,)
if len(index) < len(shape(x)):
for n_axis in range(shape(x)[axis]):
extended_index = index[:axis] + (n_axis,) + index[axis:]
x_new[extended_index] = values[nb_index]
After Change
x_new = copy(x)
use_vectorization = hasattr(indices, "__len__") and len(indices) < ndim(x)
if _is_boolean(x):
x_new[indices] = values
return x_new
zip_indices = _is_iterable(indices) and _is_iterable(indices[0])
if zip_indices:
indices = tuple(zip(*indices))
if not use_vectorization:
x_new[indices] = values
else:
indices = tuple(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: geomstats/geomstats
Commit Name: b7efa1f037f8adc94a28fc421dd7934b63b3043e
Time: 2020-04-22
Author: 62605255+pchauchat@users.noreply.github.com
File Name: geomstats/_backend/numpy/__init__.py
Class Name:
Method Name: assignment
Project Name: aleju/imgaug
Commit Name: 7ce6ab2b22bdf6e27c88cb0839768e0458f00e51
Time: 2019-03-30
Author: kontakt@ajung.name
File Name: imgaug/augmentables/normalization.py
Class Name:
Method Name: invert_normalize_images
Project Name: RaRe-Technologies/gensim
Commit Name: 658e1686e98be87c265d42e76847c9c151bc9561
Time: 2014-01-05
Author: radimrehurek@seznam.cz
File Name: gensim/models/hdpmodel.py
Class Name: HdpModel
Method Name: inference