From ad9976929c96d6cd5533fc7185bb8b4a00aad0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E7=BF=8A=E5=87=A1?= Date: Sat, 15 Aug 2026 12:56:40 +0800 Subject: [PATCH] fix: import numpy.typing for numpy<2 compatibility np.typing is only accessible as a module attribute on numpy >= 2.0. On numpy 1.x, function annotations in core/predict.py that reference np.typing.ArrayLike raise AttributeError at import time unless numpy.typing has been imported first. Add an explicit import so the module works on every numpy version, independent of import order. --- core/predict.py | 1 + 1 file changed, 1 insertion(+) diff --git a/core/predict.py b/core/predict.py index 59edb44..8dde125 100644 --- a/core/predict.py +++ b/core/predict.py @@ -4,6 +4,7 @@ from pathlib import Path import numpy as np +import numpy.typing import torch import logging