File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ def array_to_buffer(array: List[float], dtype: str) -> bytes:
44
44
return np .array (array ).astype (dtype .lower ()).tobytes ()
45
45
46
46
47
- def buffer_to_array (buffer : bytes , dtype : str ) -> List [float ]:
48
- """Convert bytes into into a list of floats ."""
47
+ def buffer_to_array (buffer : bytes , dtype : str ) -> List [Any ]:
48
+ """Convert bytes into into a list of numerics ."""
49
49
try :
50
50
VectorDataType (dtype .upper ())
51
51
except ValueError :
52
52
raise ValueError (
53
53
f"Invalid data type: { dtype } . Supported types are: { [t .lower () for t in VectorDataType ]} "
54
54
)
55
- return np .frombuffer (buffer , dtype = dtype .lower ()).tolist ()
55
+ return np .frombuffer (buffer , dtype = dtype .lower ()).tolist () # type: ignore[return-value]
56
56
57
57
58
58
def hashify (content : str , extras : Optional [Dict [str , Any ]] = None ) -> str :
You can’t perform that action at this time.
0 commit comments