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))
self.check(t)
After Change
def random(self, *shapes, **kwargs):
if all(isinstance(i, int) for i in shapes):
if kwargs.get("complex", False):
return self.random(*shapes) + 1j * self.random(*shapes)
else:
return np.random.rand(*shapes)
else:
return tuple(self.random(*shape) for shape in shapes)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
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: pymc-devs/pymc3
Commit Name: d3443536f3d4e39d5e0b8f90e1f9d0e25af77713
Time: 2013-05-06
Author: chris.fonnesbeck@vanderbilt.edu
File Name: pymc/step_methods/metropolis.py
Class Name: BinaryMetropolis
Method Name: astep
Project Name: pymc-devs/pymc3
Commit Name: 120e438fcd6357fc81a979d92b39b2bd7101dd34
Time: 2013-05-05
Author: chris.fonnesbeck@vanderbilt.edu
File Name: pymc/step_methods/metropolis.py
Class Name: BinaryMetropolis
Method Name: astep