Make cosine fail on vectors of different lengths in the translator diarizer #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The translator carries a byte-identical copy of the copilot diarizer.
cosinein diarize.mjs returns NaN forcosine([1, 2, 3], [1, 2])and ignores the extra component incosine([1, 0], [1, 0, 5]). Why it matters: The two apps must keep the same diarizer; fixing only one copy makes the copies drift apart.Proposal
Throw an Error whose message starts with
cosine:when the two arrays differ in length, exactly as the copilot task does. Keep the results for equal lengths.Acceptance criteria
cosine([1, 2, 3], [1, 2])throws an Error whose message starts withcosine:, andcosine([1, 0], [1, 0])still returns 1.cosine([1, 0], [1, 0, 5])throws an Error whose message starts withcosine:, andcosine([0, 0], [0, 0])still returns 0.Files
diarize.mjsT2T-Issue: 0x09060fd098e76bfb06be9362ac725843d1834d9218762843b41c83830b66a5c3
Number: 2
Kind: bug
Origin: imported
Proposer: 0x08809b42d05ae9526f4aa4c9670ce168aac68919
Ledger: elffuss/ledger, event 496