b7efa1f037f8adc94a28fc421dd7934b63b3043e,geomstats/_backend/tensorflow/__init__.py,,assignment,#Any#Any#Any#Any#,364
Before Change
If a single value is provided, it is assigned at all the indices.
If a list is given, it must have the same length as indices.
if not isinstance(values, list) :
return _assignment_single_value(x, values, indices, axis)
if not isinstance(indices, list):
After Change
single_index = not isinstance(indices, list)
if tf.is_tensor(indices):
single_index = ndim(indices) <= 1 and sum(indices.shape) <= ndim(x)
if single_index:
indices = [indices]
if len(values) != len(indices):
raise ValueError("Either one value or as many values as indices")
for (nb_index, index) in enumerate(indices):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: geomstats/geomstats
Commit Name: b7efa1f037f8adc94a28fc421dd7934b63b3043e
Time: 2020-04-22
Author: 62605255+pchauchat@users.noreply.github.com
File Name: geomstats/_backend/tensorflow/__init__.py
Class Name:
Method Name: assignment
Project Name: geomstats/geomstats
Commit Name: b7efa1f037f8adc94a28fc421dd7934b63b3043e
Time: 2020-04-22
Author: 62605255+pchauchat@users.noreply.github.com
File Name: geomstats/_backend/tensorflow/__init__.py
Class Name:
Method Name: assignment_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