Skip to content

Commit 7d0e23d

Browse files
authored
gguf-py : do not use internal numpy types (#7472)
1 parent 7fdb6f7 commit 7d0e23d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gguf-py/gguf/lazy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from collections import deque
77

88
import numpy as np
9-
from numpy._typing import _Shape
109
from numpy.typing import DTypeLike
1110

1211

@@ -219,7 +218,7 @@ class LazyNumpyTensor(LazyBase):
219218
_tensor_type = np.ndarray
220219

221220
@classmethod
222-
def meta_with_dtype_and_shape(cls, dtype: DTypeLike, shape: _Shape) -> np.ndarray[Any, Any]:
221+
def meta_with_dtype_and_shape(cls, dtype: DTypeLike, shape: tuple[int, ...]) -> np.ndarray[Any, Any]:
223222
# The initial idea was to use np.nan as the fill value,
224223
# but non-float types like np.int16 can't use that.
225224
# So zero it is.

0 commit comments

Comments
 (0)