Due to precision problems, the cosine metric can give back NaN instead of 0 when two binary vectors (just 0's and 1's) are the exact same.