Skip to content

Commit 0b95bcd

Browse files
author
Samule Garda
committed
fix: update scipy .A to toarray()
1 parent e2865f7 commit 0b95bcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flair/embeddings/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def embed(self, sentences: Union[list[Sentence], Sentence]):
210210
sentences = [sentences]
211211

212212
raw_sentences = [s.to_original_text() for s in sentences]
213-
tfidf_vectors = torch.from_numpy(self.vectorizer.transform(raw_sentences).A)
213+
tfidf_vectors = torch.from_numpy(self.vectorizer.transform(raw_sentences).toarray())
214214

215215
for sentence_id, sentence in enumerate(sentences):
216216
sentence.set_embedding(self.name, tfidf_vectors[sentence_id])

0 commit comments

Comments
 (0)