People: Skip midpoint calculation if dimensions don't match #22
This commit is contained in:
parent
7a90c0209e
commit
c99059567a
1 changed files with 4 additions and 0 deletions
|
@ -22,6 +22,10 @@ func EmbeddingsMidpoint(m Embeddings) (result Embedding, radius float64, count i
|
|||
continue
|
||||
}
|
||||
|
||||
if len(m[i]) != len(m[i-1]) {
|
||||
continue
|
||||
}
|
||||
|
||||
for j, val := range result {
|
||||
result[j] = (val + emb[j]) / 2
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue