From cbcb0863103e2b400a1aa083ddacf2393e045a35 Mon Sep 17 00:00:00 2001 From: stuartgo Date: Tue, 9 Dec 2025 18:02:34 +0100 Subject: [PATCH] changed to tensor again --- anansyTypes/structures/embedding.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/anansyTypes/structures/embedding.py b/anansyTypes/structures/embedding.py index 38666d5..176c32d 100644 --- a/anansyTypes/structures/embedding.py +++ b/anansyTypes/structures/embedding.py @@ -1,11 +1,13 @@ from __future__ import annotations from dataclasses import dataclass import numpy as np - - +from pydantic_tensor import Tensor +import torch @dataclass(frozen=True) class Embedding: - data: np.ndarray + data: Tensor[torch.Tensor] + + def __post_init__(self): if not isinstance(self.data, np.ndarray):