Numpy Error : Implicit conversion to a NumPy array is not allowed. Please use `.get()` to construct

preview_player
Показать описание

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!Numpy Error : Implicit conversion to a NumPy array is not allowed. Please use `.get()` to construct a NumPy array explicitly

I 'am trying to find similar vector with spacy and numpy. I found the code following url :
Mapping word vector to the most similar/closest word using spaCy
Mapping word vector to the most similar/closest word using spaCy
But I'm getting type error
import numpy as np

your_word = "country"

n=10, )

import numpy as np

your_word = "country"

n=10, )

error :
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[139], line 6
1 import numpy as np
3 your_word = "country"
7 n=10,
8 )
11 distances = ms[2]

TypeError: Implicit conversion to a NumPy array is not allowed. Please use `.get()` to construct a NumPy array explicitly.

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[139], line 6
1 import numpy as np
3 your_word = "country"
7 n=10,
8 )
11 distances = ms[2]

TypeError: Implicit conversion to a NumPy array is not allowed. Please use `.get()` to construct a NumPy array explicitly.

I'm using gpu, how can I fix this?

Tags: python,numpy,gpu,spacySource of the question:

Question and source license information:
Рекомендации по теме
visit shbcf.ru