b7efa1f037f8adc94a28fc421dd7934b63b3043e,geomstats/_backend/numpy/__init__.py,,assignment,#Any#Any#Any#Any#,121
Before Change
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
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: 8
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: geomstats/geomstats
Commit Name: cbaa185321511d7eeb3bf3a7fe7dfd6790ebb691
Time: 2020-04-04
Author: 62605255+pchauchat@users.noreply.github.com
File Name: geomstats/backend/tensorflow/__init__.py
Class Name:
Method Name: assignment_single_value
Project Name: geomstats/geomstats
Commit Name: 208439dcf621bbe1c2ba7ad67e64d645e855bba2
Time: 2020-04-23
Author: ninamio78@gmail.com
File Name: geomstats/_backend/tensorflow/__init__.py
Class Name:
Method Name: _assignment_single_value_by_sum
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