Skip to content

Commit

Permalink
Merge pull request #6 from redbubble/update-recommend-method
Browse files Browse the repository at this point in the history
Update get_item_id()
  • Loading branch information
eustin authored Dec 21, 2022
2 parents 1bd4398 + ddb2fd9 commit 354cff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyrec/implicit/als.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_item_label(self, item_id):
return self.item_labels_idx.get(item_id)

def get_item_id(self, item_label):
return self.item_labels[item_label]
return item_label if isinstance(item_label, str) else self.item_labels[item_label]

def get_user_label(self, user_id):
return self.user_labels_idx.get(user_id)
Expand Down

0 comments on commit 354cff9

Please sign in to comment.