MCPcopy
hub / github.com/redis/go-redis / generateRandomVector

Function generateRandomVector

vectorset_commands_integration_test.go:26–32  ·  view source on GitHub ↗
(dim int)

Source from the content-addressed store, hash-verified

24}
25
26func generateRandomVector(dim int) redis.VectorValues {
27 v := make([]float64, dim)
28 for i := range v {
29 v[i] = float64(rand.Intn(1000)) + rand.Float64()
30 }
31 return redis.VectorValues{Val: v}
32}
33
34var _ = Describe("Redis VectorSet commands", Label("vectorset"), func() {
35 ctx := context.TODO()

Calls 1

Float64Method · 0.45

Tested by

no test coverage detected