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
if not use_vectorization:
x_new[indices] = values
else:
indices = tuple(
list(indices[:axis]) + [slice(None)] + list(indices[axis:]))
x_new[indices] = values
return x_new
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: googledatalab/pydatalab
Commit Name: 80e5340dddd58b061b3582f980fc3bc7fc4650b6
Time: 2017-10-13
Author: qimingj@users.noreply.github.com
File Name: google/datalab/contrib/mlworkbench/commands/_ml.py
Class Name:
Method Name: _transform
Project Name: albermax/innvestigate
Commit Name: da8ffd5db89e76772f5f1dce6bc167508448e7fb
Time: 2018-02-27
Author: haegele@tu-berlin.de
File Name: innvestigate/analyzer/wrapper.py
Class Name: AugmentReduceBase
Method Name: __init__