diff --git a/anansyTypes/structures/embedding.py b/anansyTypes/structures/embedding.py index aeb56a3..38666d5 100644 --- a/anansyTypes/structures/embedding.py +++ b/anansyTypes/structures/embedding.py @@ -1,15 +1,15 @@ from __future__ import annotations from dataclasses import dataclass -import torch +import numpy as np @dataclass(frozen=True) class Embedding: - data: torch.Tensor + data: np.ndarray def __post_init__(self): - if not isinstance(self.data, torch.Tensor): - raise TypeError(f"data must be a torch.Tensor, got {type(self.data)}") + if not isinstance(self.data, np.ndarray): + raise TypeError(f"data must be a numpy.ndarray, got {type(self.data)}") def compare(self, other: Embedding) -> float: """ diff --git a/anansyTypes/structures/lexeme.py b/anansyTypes/structures/lexeme.py index 082ae71..2d27e8d 100644 --- a/anansyTypes/structures/lexeme.py +++ b/anansyTypes/structures/lexeme.py @@ -20,3 +20,5 @@ class Lexeme(ABC): """Embedding(s) associated with the lexeme.""" pass + +