c9e82bb1ab323d4a79793e47dbdd9204302e36af,mlxtend/file_io/find.py,,find_filegroups,#,68
Before Change
pass
if validity_check:
num = sorted([(len(v),k) for k,v in groups.items()])
for i in num[1:]:
if i[0] < num[0][0]:
print("Warning, key "%s" has less values than "key" %s." % (i[1], num[0][1]))
groups = {}
return groups
After Change
groups = {}
for f in base:
basename = os.path.splitext(os.path.basename(f))[0]
basename = re.sub("\%s$" % rstrip, "", basename)
groups[basename] = [f]
//groups = {os.path.splitext(os.path.basename(f))[0].rstrip(rstrip):[f] for f in base}
for idx,r in enumerate(rest):
for f in r:
basename, ext = os.path.splitext(os.path.basename(f))
basename = re.sub("\%s$" % rstrip, "", basename)
try:
if extensions[idx+1] == "" or ext == extensions[idx+1]:
groups[basename].append(f)
except KeyError:
pass
if validity_check:
lens = [len(groups[k]) for k in groups.keys()]
if len(set(lens)) > 1:
raise ValueError("Warning, some keys have more/less values than others. Set validity_check=False to ignore this warning.")
return groups

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: rasbt/mlxtend
Commit Name: c9e82bb1ab323d4a79793e47dbdd9204302e36af
Time: 2015-04-06
Author: se.raschka@me.com
File Name: mlxtend/file_io/find.py
Class Name:
Method Name: find_filegroups
Project Name: scikit-optimize/scikit-optimize
Commit Name: 2e0effe79edeaccb70906d6a68310333dcc13cd6
Time: 2016-06-16
Author: betatim@gmail.com
File Name: skopt/learning/gbrt.py
Class Name: GradientBoostingQuantileRegressor
Method Name: fit
Project Name: pgmpy/pgmpy
Commit Name: ca25da7c55ba436ab557410d5f2e2e9b557d2840
Time: 2015-03-02
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/MarkovModel.py
Class Name: MarkovModel
Method Name: to_junction_tree