Skip to content

Commit 1fefbe9

Browse files
updates notebook to remove dtype arg in method calls
1 parent a7d3657 commit 1fefbe9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/user_guide/vectorizers_04.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
"outputs": [],
351351
"source": [
352352
"# You can also create many embeddings at once\n",
353-
"embeddings = hf.embed_many(sentences, as_buffer=True, dtype=\"float32\")\n"
353+
"embeddings = hf.embed_many(sentences, as_buffer=True)\n"
354354
]
355355
},
356356
{
@@ -925,8 +925,9 @@
925925
"# subsequent calls to embed('', as_buffer=True) and embed_many('', as_buffer=True) will now encode as float16\n",
926926
"float16_bytes = vectorizer.embed('test sentence', as_buffer=True)\n",
927927
"\n",
928-
"# you can override this setting on each individual method call\n",
929-
"float64_bytes = vectorizer.embed('test sentence', as_buffer=True, dtype=\"float64\")\n",
928+
"# to generate embeddings with different dtype instantiate a new vectorizer\n",
929+
"vectorizer_64 = HFTextVectorizer(dtype=\"float64\")\n",
930+
"float64_bytes = vectorizer_64.embed('test sentence', as_buffer=True)\n",
930931
"\n",
931932
"float16_bytes != float64_bytes"
932933
]

0 commit comments

Comments
 (0)