df38756fb9220bd605acc3e8d5fd42f7f43c3a1e,tests/test_ops.py,OpsTestCase,random,#OpsTestCase#,56

Before Change


    def random(self, *shapes):
        if all(isinstance(i, int) for i in shapes):
            shapes = [shapes]
        arrays = tuple(np.random.rand(*shape) for shape in shapes)
        return arrays[0] if len(shapes) == 1 else arrays

    def test_Identity(self):
        t = tf.identity(self.random(3, 4))

After Change


            else:
                return np.random.rand(*shapes)
        else:
            return tuple(self.random(*shape) for shape in shapes)

    def test_Identity(self):
        t = tf.identity(self.random(3, 4))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: riga/tfdeploy
Commit Name: df38756fb9220bd605acc3e8d5fd42f7f43c3a1e
Time: 2016-03-10
Author: marcelrieger@me.com
File Name: tests/test_ops.py
Class Name: OpsTestCase
Method Name: random


Project Name: DistrictDataLabs/yellowbrick
Commit Name: ca14cf72e3e4bd3a6136cafad8701ac41f48f09b
Time: 2018-08-25
Author: davidwaterman@gmail.com
File Name: yellowbrick/cluster/elbow.py
Class Name: KElbowVisualizer
Method Name: __init__


Project Name: explosion/thinc
Commit Name: 2eef369b7ac92e38f81819307a4af4238fd953ee
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/jax_ops.py
Class Name: JaxOps
Method Name: pad