Fixing ValueError in "while j in user_items"

Line 140 doesn't behave as expected when using a sparse structure as an user_items array - converting it to a dense matrix seems to fix the issue.