def cosine(a, b):
result = np.dot(a, b) / np.linalg.norm(a) / np.linalg.norm(b)<EOL>return np.clip(result, -<NUM_LIT:1>, <NUM_LIT:1>)<EOL>
Compute the cosine between two vectors

       The result is clipped within the range [-1, 1]