In the cosine_distance function, Numpy sometimes round off the return value of the dot function to Zero resulting this:
RuntimeWarning: invalid value encountered in double_scalars
we might have to go for a high precision mathematics library.
Adding this mostly as a reminder for myself.
This is not a very frequent issue. Happens only rarely. I just got this when I was testing a local peer querying. (Which works, btw @minimalparts . I was wrong before. :-) )
In the cosine_distance function, Numpy sometimes round off the return value of the dot function to Zero resulting this:
RuntimeWarning: invalid value encountered in double_scalars
we might have to go for a high precision mathematics library. Adding this mostly as a reminder for myself.