Skip to content

Commit

Permalink
Avoid creating list of uris
Browse files Browse the repository at this point in the history
  • Loading branch information
juhoinkinen committed Aug 10, 2021
1 parent b273cea commit 3a5adb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion annif/backend/svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _corpus_to_texts_and_classes(self, corpus):
self.warning(
'training on a document with multiple subjects is not ' +
'supported by SVC; selecting one random subject.')
classes.append(list(doc.uris)[0])
classes.append(iter(doc.uris).next())
return texts, classes

def _train_classifier(self, veccorpus, classes):
Expand Down

0 comments on commit 3a5adb6

Please sign in to comment.