be119b0bb043be437f9619c26cf0f9878a6a9090,GPflow/misc.py,,get_tensor_by_name,#Any#Any#Any#,38

Before Change


    graph = _get_graph(graph)
    try:
        if index is not None:
            return graph.get_tensor_by_name(":".join([name, index]))
        return graph.get_tensor_by_name(name)
    except ValueError:
        return None

After Change


    if index is not None:
        return _get_tensor_by_name(name, index, graph)
    tensor = _get_tensor_by_name(name, "0", graph)
    if tensor is None:
        return tensor
    if _get_tensor_by_name(name, "1", graph) is not None:
        raise ValueError("Ambiguous tensor for "{0}" with multiple indices found."
                         .format(name))
    return tensor


def is_ndarray(value):
    return isinstance(value, np.ndarray)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: GPflow/GPflow
Commit Name: be119b0bb043be437f9619c26cf0f9878a6a9090
Time: 2017-09-14
Author: art.art.v@gmail.com
File Name: GPflow/misc.py
Class Name:
Method Name: get_tensor_by_name


Project Name: GPflow/GPflow
Commit Name: 12bd394eb63ae4ee62c3fb3ba3badc8f1b40e1d3
Time: 2017-10-08
Author: art.art.v@gmail.com
File Name: gpflow/params/dataholders.py
Class Name: Minibatch
Method Name: _parameter_name


Project Name: GPflow/GPflow
Commit Name: 12bd394eb63ae4ee62c3fb3ba3badc8f1b40e1d3
Time: 2017-10-08
Author: art.art.v@gmail.com
File Name: gpflow/params/dataholders.py
Class Name: FormlessData
Method Name: _parameter_name