Normalise list of N dimensional numpy arrays
The trick is to use the keepdims parameter.

import numpy as np

num_vecs = 10
dims = 2

vecs = np.random.normal(size=(num_vecs, dims))


vecs /= np.linalg.norm(vecs, axis=1, keepdims=True)

assert np.allclose(np.linalg.norm(vecs, axis=1), 1.)