Skip to content

Commit 150f157

Browse files
committed
Better fix than earlier for quants.py
after researching the typing issues introduced in numpy 2.2
1 parent eb7cef1 commit 150f157

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gguf-py/gguf/quants.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# pyright: reportInvalidTypeForm=false
2+
13
from __future__ import annotations
24
from abc import ABC, abstractmethod
35
from typing import Any, Callable, Sequence
@@ -78,7 +80,7 @@ class __Quant(ABC):
7880
block_size: int
7981
type_size: int
8082

81-
grid: np.ndarray | None = None # np.float32
83+
grid: np.ndarray[Any, np.dtype[np.float32]] | None = None
8284
grid_shape: tuple[int, int] = (0, 0)
8385
grid_map: tuple[int | float, ...] = ()
8486
grid_hex: bytes | None = None

0 commit comments

Comments
 (0)