Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input matricies need to be int32 #21

Closed
jattenberg opened this issue Sep 18, 2015 · 1 comment
Closed

Input matricies need to be int32 #21

jattenberg opened this issue Sep 18, 2015 · 1 comment

Comments

@jattenberg
Copy link

Often arrays are created into different types than what is required by the lightfm c code. this can result in errors like:

File "/home/jattenberg/anaconda/lib/python2.7/site-packages/lightfm/lightfm.py", line 194, in fit verbose=verbose) File "/home/jattenberg/anaconda/lib/python2.7/site-packages/lightfm/lightfm.py", line 254, in fit_partial self.loss) File "/home/jattenberg/anaconda/lib/python2.7/site-packages/lightfm/lightfm.py", line 289, in _run_epoch CSRMatrix(self._get_positives_lookup_matrix(interactions)), File "lightfm/lightfm_fast.pyx", line 91, in lightfm.lightfm_fast.CSRMatrix.__init__ (lightfm/lightfm_fast.c:1966) ValueError: Buffer dtype mismatch, expected 'int' but got 'long long'

input matricies can automatically be converted to int32

@maciejkula
Copy link
Collaborator

Solved in #22 and deployed to pypi as 1.4. pip install lightfm==1.4 should get the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants