# Calculate the angle between two vectors in NumPy (Python)

You can get the angle between two vectors in NumPy (Python) as follows.

import numpy as np
import numpy.linalg as LA

a = np.array([1, 2])
b = np.array([-5, 4])

inner = np.inner(a, b)
norms = LA.norm(a) * LA.norm(b)

cos = inner / norms