edd86f6318b411a42a1f287fa6359bbfd12fa71c,python/src/nnabla/functions.py,,scatter_nd,#Any#Any#Any#Any#,915

Before Change


        if not isinstance(indices, np.ndarray):
            indices = np.asarray(indices, dtype=np.int)
        indices = nn.Variable.from_numpy_array(indices)
    if ref is not None:
        if not isinstance(ref, nn.NdArray):
            raise TypeError("reference data must be NdArray type")
        if not ref.shape == shape:
            raise ValueError("reference data must have shape {}".format(shape))
    return scatter_nd_base(data, indices, shape, outputs=[ref])

After Change


        if not isinstance(indices, np.ndarray):
            indices = np.asarray(indices, dtype=np.int)
        indices = nn.Variable.from_numpy_array(indices)
    if shape is None and out is None:
        raise TypeError("One of `shape` or `out` argument must be supplied.")
    if shape and out:
        raise TypeError("Only one of `shape` or `out` argument may be used.")
    if out:
        if isinstance(out, nn.Variable):
            out = out.data
        if not isinstance(out, nn.NdArray):
            raise TypeError("`out` argument must be NdArray or Variable type.")
        shape = out.shape
        outputs = [out]
    else:
        if isinstance(shape, np.ndarray):
            shape = shape.tolist()
        outputs = None
    return scatter_nd_base(data, indices, shape, outputs=outputs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: sony/nnabla
Commit Name: edd86f6318b411a42a1f287fa6359bbfd12fa71c
Time: 2019-06-24
Author: stephen.tiedemann@sony.com
File Name: python/src/nnabla/functions.py
Class Name:
Method Name: scatter_nd


Project Name: tensorflow/transform
Commit Name: 93c5a8952f5a350c78243bc1ffa47b07f5f93721
Time: 2017-11-22
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/coders/example_proto_coder.py
Class Name: _FixedLenFeatureHandler
Method Name: __init__


Project Name: keras-team/keras-preprocessing
Commit Name: f5144e5979f1464df12dc85d9b67ea44f43b9193
Time: 2019-03-12
Author: rragundez@users.noreply.github.com
File Name: keras_preprocessing/image/dataframe_iterator.py
Class Name: DataFrameIterator
Method Name: __init__