@@ -22,10 +22,10 @@ def __init__(self, value: dict[int, float], dimensions: int, /) -> None:
2222 ...
2323
2424 @overload
25- def __init__ (self , value : list [float ] | np .ndarray [tuple [int ], np .dtype [np .floating ]] | sparray | spmatrix , / ) -> None :
25+ def __init__ (self , value : list [float ] | np .ndarray [tuple [int , ... ], np .dtype [np .floating ]] | sparray | spmatrix , / ) -> None :
2626 ...
2727
28- def __init__ (self , value : dict [int , float ] | list [float ] | np .ndarray [tuple [int ], np .dtype [np .floating ]] | sparray | spmatrix , dimensions : int | Any = NO_DEFAULT , / ) -> None :
28+ def __init__ (self , value : dict [int , float ] | list [float ] | np .ndarray [tuple [int , ... ], np .dtype [np .floating ]] | sparray | spmatrix , dimensions : int | Any = NO_DEFAULT , / ) -> None :
2929 if SCIPY_AVAILABLE and isinstance (value , (sparray , spmatrix )):
3030 if dimensions is not NO_DEFAULT :
3131 raise ValueError ('extra argument' )
@@ -70,7 +70,7 @@ def to_list(self) -> list[float]:
7070 vec [i ] = v
7171 return vec
7272
73- def to_numpy (self ) -> np .ndarray [tuple [int ], np .dtype [np .float32 ]]:
73+ def to_numpy (self ) -> np .ndarray [tuple [int , ... ], np .dtype [np .float32 ]]:
7474 vec = np .repeat (0.0 , self ._dim ).astype (np .float32 )
7575 for i , v in zip (self ._indices , self ._values ):
7676 vec [i ] = v
0 commit comments