From a4799f2c3faa879819d560db0abe38665952e009 Mon Sep 17 00:00:00 2001 From: Christoph Eder Date: Thu, 18 Dec 2025 16:18:36 +0100 Subject: [PATCH] Changes in symbol.py Trying just bytes now --- anansyTypes/structures/symbol.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/anansyTypes/structures/symbol.py b/anansyTypes/structures/symbol.py index 7fefbbc..fa211f9 100644 --- a/anansyTypes/structures/symbol.py +++ b/anansyTypes/structures/symbol.py @@ -11,21 +11,19 @@ import base64 class Symbol: id: int label: str - image: np.ndarray + image: bytes @classmethod def from_dict(cls, data: dict) -> "Symbol": if isinstance(data["image"], str): - # Decode base64 to numpy array image_bytes = base64.b64decode(data["image"]) - image_array = np.frombuffer(image_bytes, dtype=np.uint8) else: - image_array = np.array(data["image"], dtype=np.uint8) + image_bytes = bytes(data["image"]) return cls( id=data["id"], label=data["label"], - image=image_array, + image=image_bytes, ) @classmethod