Open baibai25 opened 1 year ago
Here is my environment
- OS: Ubuntu 20.04.1
- Python: 3.9.2
- numpy: 1.24.2
- lightfm: 1.17
the same problem, and changing from
id_feature_labels = np.empty(num_items, dtype=str)
to
id_feature_labels = np.empty(num_items, dtype=object)
works
Hi! Thank you for fix #676! I updated to version 1.17 and tried the tutorial code with the following results.
The label dtype is '<U1', which appears to be incorrect. I ran movielens.py on my Notebook and got the same result.
Suggestion
Probably an error caused by the numpy specification. I suggest following modifications:
https://github.com/lyst/lightfm/blob/688feded0717f289933b95a0134bad6fbe547331/lightfm/datasets/movielens.py#L75
In my Notebook, it works!