Skip to content

Commit

Permalink
fix numpy / torch type bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Jan 6, 2025
1 parent 91633ef commit 8472e4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lenskit/lenskit/knn/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def __call__(self, query: QueryInput, items: ItemList) -> ItemList:

# subset the model to rated and target items
model = self.sim_matrix_
model = model[ri_valid_nums, :]
model = model[ri_valid_nums.numpy(), :]
assert isinstance(model, csr_array)
model = model[:, ti_valid_nums]
assert isinstance(model, csr_array)
Expand Down

0 comments on commit 8472e4b

Please sign in to comment.