3576ad8e87e7cfb5ba7e22296a6ab57226b957b2,PyPi/utils/parameters.py,Parameter,__call__,#Parameter#Any#,10
Before Change
def __call__(self, idx, **kwargs):
if not isinstance(idx, tuple):
idx = tuple(idx.ravel())
idx = idx if self._n_updates.size > 1 else 0
After Change
self._n_updates = np.zeros(shape)
def __call__(self, idx, **kwargs):
if isinstance(idx, list):
assert idx[0].ndim == 2 and idx[1].ndim == 2
assert idx[0].shape[0] == idx[1].shape[0]
idx = tuple(np.concatenate((idx[0], idx[1]), axis=1).ravel())
else:
idx = tuple(idx)
idx = idx if self._n_updates.size > 1 else 0
self._n_updates[idx] += 1
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: AIRLab-POLIMI/mushroom
Commit Name: 3576ad8e87e7cfb5ba7e22296a6ab57226b957b2
Time: 2017-07-23
Author: carlo.deramo@gmail.com
File Name: PyPi/utils/parameters.py
Class Name: Parameter
Method Name: __call__
Project Name: AIRLab-POLIMI/mushroom
Commit Name: f2cfa5fb8e73229a1757acbcc94bab13099de439
Time: 2017-06-05
Author: carlo.deramo@gmail.com
File Name: PyPi/utils/spaces.py
Class Name: Discrete
Method Name: get_idx
Project Name: AIRLab-POLIMI/mushroom
Commit Name: c24348fe44025c97a7cf7a680b35dfbee3993bf1
Time: 2017-06-08
Author: carlo.deramo@gmail.com
File Name: PyPi/utils/parameters.py
Class Name: Parameter
Method Name: __call__