Skip to content

Commit

Permalink
Use os.path.splitext instead of rstrip to remove .txt
Browse files Browse the repository at this point in the history
Fixes #51
  • Loading branch information
iamthad committed Feb 14, 2019
1 parent a950343 commit dffc25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion whereami/get_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ def get_train_data(folder=None):
for line in f:
data.append(json.loads(line))
X.extend(data)
y.extend([fname.rstrip(".txt")] * len(data))
y.extend([os.path.splitext(fname)[0]] * len(data))
return X, y

0 comments on commit dffc25b

Please sign in to comment.