cosine_similarity.py: Use single numpy matrix -- faster + memory efficient