b7efa1f037f8adc94a28fc421dd7934b63b3043e,geomstats/_backend/numpy/__init__.py,,assignment,#Any#Any#Any#Any#,121
Before Change
indices = [indices]
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]
else:
x_new[index] = values[nb_index]
return x_new
def assignment_by_sum(x, values, indices, axis=0):
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: 4
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: scikit-optimize/scikit-optimize
Commit Name: 544875dd8a7fea49a86e5623d37274159b4ba7b5
Time: 2017-01-10
Author: betatim@gmail.com
File Name: skopt/optimizer/base.py
Class Name:
Method Name: base_minimize
Project Name: cjhutto/vaderSentiment
Commit Name: 55fcc4c981b8ec5a84e0886141fb0ed2b892de9e
Time: 2018-09-06
Author: christopherwong888@gmail.com
File Name: vaderSentiment/vaderSentiment.py
Class Name: SentiText
Method Name: _words_and_emoticons
Project Name: openai/baselines
Commit Name: 9b68103b737ac46bc201dfb3121cfa5df2127e53
Time: 2019-05-08
Author: peterzhokhoff@gmail.com
File Name: baselines/common/vec_env/vec_monitor.py
Class Name: VecMonitor
Method Name: step_wait