Skip to content

Commit

Permalink
fix: encoding for storage (#3, #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
gusye1234 committed Oct 21, 2024
1 parent bbd27c3 commit ae85cbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nano_vectordb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .dbs import NanoVectorDB

__version__ = "0.0.4"
__version__ = "0.0.4.1"
__author__ = "Jianbai Ye"
__url__ = "https://github.com/gusye1234/nano-vectordb"
2 changes: 1 addition & 1 deletion nano_vectordb/dbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def buffer_string_to_array(base64_str: str, dtype=Float) -> np.ndarray:
def load_storage(file_name) -> Union[DataBase, None]:
if not os.path.exists(file_name):
return None
with open(file_name) as f:
with open(file_name, encoding="utf-8") as f:
data = json.load(f)
data["matrix"] = buffer_string_to_array(data["matrix"]).reshape(
-1, data["embedding_dim"]
Expand Down

0 comments on commit ae85cbf

Please sign in to comment.