(label string, vector []float32, index int)
| 314 | } |
| 315 | |
| 316 | func formatVector(label string, vector []float32, index int) string { |
| 317 | vectorString := fmt.Sprintf(`"[%s]"`, strings.Trim(strings.Join(strings.Fields(fmt.Sprint(vector)), ", "), "[]")) |
| 318 | return fmt.Sprintf("<0x%x> <%s> %s . \n", index+10, label, vectorString) |
| 319 | } |
| 320 | |
| 321 | func generateRandomVectors(numVectors, vectorSize int, label string) (string, [][]float32) { |
| 322 | var builder strings.Builder |
no test coverage detected