Skip to content

Commit

Permalink
tiny docstring impro
Browse files Browse the repository at this point in the history
  • Loading branch information
hemidactylus committed Apr 4, 2024
1 parent 6a0ce9b commit 49180aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions astrapy/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def create_collection(
Example:
>>> new_col = my_db.create_collection("my_v_col", dimension=3)
>>> new_col.insert_one({"name": "the_row", "$vector": [0.4, 0.5, 0.7]})
>>> new_col.insert_one({"name": "the_row"}, vector=[0.4, 0.5, 0.7])
InsertOneResult(raw_results=..., inserted_id='e22dd65e-...-...-...')
"""

Expand Down Expand Up @@ -1177,7 +1177,8 @@ async def create_collection(
>>> async def create_and_insert(adb: AsyncDatabase) -> Dict[str, Any]:
... new_a_col = await adb.create_collection("my_v_col", dimension=3)
... return await new_a_col.insert_one(
... {"name": "the_row", "$vector": [0.4, 0.5, 0.7]}
... {"name": "the_row"},
... vector=[0.4, 0.5, 0.7],
... )
...
>>> asyncio.run(create_and_insert(my_async_db))
Expand Down

0 comments on commit 49180aa

Please sign in to comment.