minimalparts / PeARS

Archive repository for the PeARS project. Please head over to https://github.com/PeARSearch/PeARS-orchard for the latest version.
MIT License
17 stars 20 forks source link

Divide by zero RunTime error #24

Open nandajavarma opened 9 years ago

nandajavarma commented 9 years ago

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.

nandajavarma commented 9 years ago

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. :-) )