2909332cb7d37f80b6f7096043a3784e5c9f4aa9,hyperopt/gdist.py,Union,perform,#Union#Any#Any#Any#,47
Before Change
def perform(self, node, inputs, outstorage):
ans = set(inputs[0])
for ii in inputs[1:]:
ans.update(ii)
ans = numpy.array(sorted(ans))
outstorage[0][0] = node.outputs[0].type.filter(ans, strict=False)
union = Union()
After Change
def perform(self, node, inputs, outstorage):
for ii in inputs:
if "int" not in str(ii.dtype):
raise TypeError("non-int arg to SetOp", ii)
ans = set(inputs[0])
if self.operation == "union":
ans.update(*inputs[1:])
elif self.operation == "difference":
ans.difference_update(*inputs[1:])
else:
raise NotImplementedError(self.operation)
npy_ans = numpy.array(sorted(ans), dtype=node.outputs[0].dtype)
outstorage[0][0] = node.outputs[0].type.filter(npy_ans, strict=True)
union = SetOp("union")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: hyperopt/hyperopt
Commit Name: 2909332cb7d37f80b6f7096043a3784e5c9f4aa9
Time: 2011-10-31
Author: james.bergstra@gmail.com
File Name: hyperopt/gdist.py
Class Name: Union
Method Name: perform
Project Name: tensorflow/hub
Commit Name: 605955d9d4716491228f69a013707cafa693c67a
Time: 2019-03-13
Author: no-reply@google.com
File Name: tensorflow_hub/native_module.py
Class Name: _ModuleImpl
Method Name: create_apply_graph
Project Name: PyMVPA/PyMVPA
Commit Name: c0070d833df41640a9970bc74357e76627cd442e
Time: 2010-01-13
Author: michael.hanke@gmail.com
File Name: mvpa/base/hdf5.py
Class Name:
Method Name: hdf2obj