Skip to content

Commit

Permalink
Fix bruteforce python example
Browse files Browse the repository at this point in the history
  • Loading branch information
lowener committed Nov 21, 2024
1 parent 6f237fc commit 2bf9045
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions python/cuvs/cuvs/neighbors/brute_force/brute_force.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,15 @@ def load(filename, resources=None):
--------
>>> import cupy as cp
>>> from cuvs.neighbors import brute_force
>>> # Load an index previously built
>>> index = brute_force.load("my_index.bin")
>>> n_samples = 50000
>>> n_features = 50
>>> dataset = cp.random.random_sample((n_samples, n_features),
... dtype=cp.float32)
>>> # Build index
>>> index = brute_force.build(dataset)
>>> # Serialize and deserialize the brute_force index built
>>> brute_force.save("my_index.bin", index)
>>> index_loaded = brute_force.load("my_index.bin")
"""
cdef Index idx = Index()
cdef cuvsResources_t res = <cuvsResources_t>resources.get_c_obj()
Expand Down

0 comments on commit 2bf9045

Please sign in to comment.