Nov-05-2018, 03:27 PM
import numpy as np a = np.array([1, 2]) b = np.array([2, 1]) dot = 0 cosangle = a.dot(b) / (np.linalg.norm(a) * np.linalg.norm(b)) print(cosangle)So I'm following a tutorial and the guy doesn't explain allot in terms of why this actually gives
the value of the cosine. Please Help.