Spaces:
Sleeping
Sleeping
File size: 108 Bytes
0f98d7f |
1 2 3 4 5 |
from numpy.linalg import norm
import numpy as np
def cosine(x, y):
return np.dot(x,y)/(norm(x)*norm(y)) |