5618b32c22d250af800eb030e8df983a5916078f,pyimgaug/augmenters2.py,Sometimes,__init__,#Sometimes#Any#Any#Any#Any#Any#Any#,385
Before Change
raise Exception("Expected float/int in range [0, 1] or StochasticParameter as p, got %s." % (type(p),))
if then_list is None:
self.then_list = Sequential([], name="%s-then" % (self.name,), random_state=ia.new_random_state())
elif isinstance(then_list, Augmenter):
self.then_list = then_list
elif ia.is_iterable(then_list):
self.then_list = Sequential(then_list, name="%s-then" % (self.name,), random_state=ia.new_random_state())
else:
raise Exception("Expected None, Augmenter or list/tuple as then_list, got %s." % (type(then_list),))
if else_list is None:
self.else_list = Sequential([], name="%s-else" % (self.name,), random_state=ia.new_random_state())
elif isinstance(else_list, Augmenter):
self.else_list = else_list
elif ia.is_iterable(else_list):
self.else_list = Sequential(else_list, name="%s-else" % (self.name,), random_state=ia.new_random_state())
else:
raise Exception("Expected None, Augmenter or list/tuple as else_list, got %s." % (type(else_list),))
After Change
elif ia.is_iterable(then_list):
self.then_list = Sequential(then_list, name="%s-then" % (self.name,))
elif isinstance(then_list, Augmenter):
self.then_list = Sequential([then_list], name="%s-then" % (self.name,))
else:
raise Exception("Expected None, Augmenter or list/tuple as then_list, got %s." % (type(then_list),))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: aleju/imgaug
Commit Name: 5618b32c22d250af800eb030e8df983a5916078f
Time: 2016-11-22
Author: kontakt@ajung.name
File Name: pyimgaug/augmenters2.py
Class Name: Sometimes
Method Name: __init__
Project Name: aleju/imgaug
Commit Name: 78e3ff2439c9db341c7c3e7c0af21114909f456d
Time: 2018-10-02
Author: kontakt@ajung.name
File Name: imgaug/augmenters/geometric.py
Class Name: ElasticTransformation
Method Name: _augment_heatmaps
Project Name: aleju/imgaug
Commit Name: 5618b32c22d250af800eb030e8df983a5916078f
Time: 2016-11-22
Author: kontakt@ajung.name
File Name: pyimgaug/augmenters2.py
Class Name: Sometimes
Method Name: __init__
Project Name: aleju/imgaug
Commit Name: a639c56f640a9fc5bc487b5d4d9544cc876fa62a
Time: 2019-01-28
Author: kontakt@ajung.name
File Name: imgaug/augmenters/geometric.py
Class Name: ElasticTransformation
Method Name: _augment_heatmaps