b85e17830cdbefd3bf70794b27274e9598c2ab74,chainer/initializers/orthogonal.py,Orthogonal,__call__,#Orthogonal#Any#,74

Before Change


                "{} != {}".format(array.dtype, self.dtype)
        if not array.shape:  // 0-dim case
            backend.copyto(array, numpy.asarray(
                self.scale * (2 * int(self.rng.randint(2)) - 1),
                dtype=array.dtype))
        elif not array.size:
            raise ValueError("Array to be initialized must be non-empty.")

After Change


                "{} != {}".format(array.dtype, self.dtype)
        if not array.shape:  // 0-dim case
            if self.rng is None:
                a = numpy.random.randint(2)
            else:
                a = self.rng.randint(2)
            a = int(a)
            array[...] = self.scale * (2 * a - 1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: chainer/chainer
Commit Name: b85e17830cdbefd3bf70794b27274e9598c2ab74
Time: 2019-09-10
Author: nc.jky0@gmail.com
File Name: chainer/initializers/orthogonal.py
Class Name: Orthogonal
Method Name: __call__


Project Name: pymc-devs/pymc3
Commit Name: 7b5cd32b8872c4892ac6307f57758d682929cb88
Time: 2018-06-22
Author: aloctavodia@gmail.com
File Name: pymc3/step_methods/smc.py
Class Name:
Method Name: sample_smc


Project Name: apache/incubator-mxnet
Commit Name: dfa3d07a74e59297394c624a3373a335f94a64eb
Time: 2019-12-26
Author: xinyu1.chen@intel.com
File Name: example/neural_collaborative_filtering/ncf.py
Class Name:
Method Name: