MCPcopy Create free account
hub / github.com/cosdata/cosdata / generate_random_vector_with_id

Function generate_random_vector_with_id

tests/rps-test.py:185–187  ·  view source on GitHub ↗
(id, length)

Source from the content-addressed store, hash-verified

183
184
185def generate_random_vector_with_id(id, length):
186 values = np.random.uniform(-1, 1, length).tolist()
187 return {"id": str(id), "values": values}
188
189
190def perturb_vector(vector, perturbation_degree):

Callers 2

generate_vectorsFunction · 0.70
rps-test.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected