a9b190782d82a78ae52346efc93689b4f3a244fd,GPy/core/index_operations.py,ParameterIndexOperations,add,#ParameterIndexOperations#Any#Any#,61
Before Change
def add(self, prop, indices):
ind = self.create_raveled_indices(indices)
if prop in self._properties:
self._properties[prop] = numpy.union1d(self._properties[prop], ind)
else:
self._properties[prop] = ind
def remove(self, prop, indices):
if prop in self._properties:
ind = self.create_raveled_indices(indices)
diff = numpy.setdiff1d(self._properties[prop], ind, True)
After Change
self.params = params
self.tied_from = ConstraintIndexOperations()
self.tied_to = ConstraintIndexOperations()
def add(self, tied_from, tied_to):
self.tied_from.add(tied_to, tied_from._current_slice, tied_from._realshape, self.params._offset(tied_from))
self.tied_to.add(tied_to, tied_to._current_slice, tied_to._realshape, self.params._offset(tied_to))
def remove(self, tied_from, tied_to):
self.tied_from.remove(tied_to, tied_from._current_slice, tied_from._realshape, self.params._offset(tied_from))
self.tied_to.remove(tied_to, tied_to._current_slice, tied_to._realshape, self.params._offset(tied_to))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: SheffieldML/GPy
Commit Name: a9b190782d82a78ae52346efc93689b4f3a244fd
Time: 2013-10-11
Author: ibinbei@gmail.com
File Name: GPy/core/index_operations.py
Class Name: ParameterIndexOperations
Method Name: add
Project Name: facebookresearch/ParlAI
Commit Name: 9ad1d2da68aa4acf817562502340bf319276b283
Time: 2019-05-14
Author: jju@fb.com
File Name: parlai/mturk/core/dev/socket_manager.py
Class Name: SocketManager
Method Name: open_channel
Project Name: VOLTTRON/volttron
Commit Name: eecd204f1a5ba4de9752991e0fcbc86506309f1e
Time: 2019-12-09
Author: craig.allwardt@pnnl.gov
File Name: volttron/platform/agent/web.py
Class Name: Response
Method Name: add_header
Project Name: SheffieldML/GPy
Commit Name: a9b190782d82a78ae52346efc93689b4f3a244fd
Time: 2013-10-11
Author: ibinbei@gmail.com
File Name: GPy/core/index_operations.py
Class Name: ParameterIndexOperations
Method Name: add