b7efa1f037f8adc94a28fc421dd7934b63b3043e,geomstats/_backend/tensorflow/__init__.py,,assignment_by_sum,#Any#Any#Any#Any#,279

Before Change


    if not isinstance(values, list):
        return _assignment_single_value_by_sum(x, values, indices, axis)

    if not isinstance(indices, list):
        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):

After Change


    if _is_boolean(indices):
        indices = [index for index, val in enumerate(indices) if val]

    if tf.rank(values) == 0:
        return _assignment_single_value_by_sum(x, values, indices, axis)

    single_index = not isinstance(indices, list)
    if tf.is_tensor(indices):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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_by_sum


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: GPflow/GPflow
Commit Name: d25eb15fabaad990649f38921fe773bf92b9ef51
Time: 2018-01-24
Author: ialong@users.noreply.github.com
File Name: gpflow/densities.py
Class Name:
Method Name: multivariate_normal