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

Code create_model.py raises error AttributeError: 'list' object has no attribute 'tolist' #3

Open
Soudeh-Jahanshahi opened this issue Dec 25, 2023 · 0 comments

Comments

@Soudeh-Jahanshahi
Copy link
Contributor

Function load_numpy_file at line 75 of code create_model.py raises error AttributeError: 'list' object has no attribute 'tolist'.

To fix the error one can replace line 75 with

  • either join_text = [list(doc[1]) + list(doc[2]) for doc in data]
  • or with line 21 to 32 of code generate_embeddings.py.

Sorry that I didn't do the change to fix the code: I don't know if I am allowed to commit changes to this repository or not!

@Soudeh-Jahanshahi Soudeh-Jahanshahi changed the title Function load_numpy_file at line 75 of code [create_model.py](https://github.com/zbmed-semtec/hybrid-pre-doc2vec-doc-relevance/blob/main/code/embeddings/create_model.py) raises error AttributeError: 'list' object has no attribute 'tolist' Code create_model.py raises error AttributeError: 'list' object has no attribute 'tolist' Dec 25, 2023
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

1 participant