b7efa1f037f8adc94a28fc421dd7934b63b3043e,geomstats/_backend/numpy/__init__.py,,assignment,#Any#Any#Any#Any#,121
Before Change
If a list is given, it must have the same length as indices.
x_new = copy(x)
if not isinstance(indices, list):
indices = [indices]
if not isinstance(values, list):
values = [values] * len(indices)
for nb_index, index in enumerate(indices):
if not isinstance(index, tuple):
After Change
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: 4
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: PyMVPA/PyMVPA
Commit Name: 9785499036e54b40297ce29b62992a996be78b33
Time: 2009-12-15
Author: michael.hanke@gmail.com
File Name: mvpa/tests/test_mapper.py
Class Name:
Method Name: test_subset
Project Name: brian-team/brian2
Commit Name: 5fbc928a5116c12408b4b8325a9c2bc3280681c3
Time: 2014-01-20
Author: marcel.stimberg@ens.fr
File Name: brian2/groups/poissongroup.py
Class Name: PoissonGroup
Method Name: __init__
Project Name: scipy/scipy
Commit Name: 11ad8b2ae370dec34ed3d92e47beb4d3ad84a7e9
Time: 2020-02-12
Author: 31594632+ananyashreyjain@users.noreply.github.com
File Name: scipy/sparse/_index.py
Class Name:
Method Name: _unpack_index