def randvector3(n):
    x = np.empty([n, 2])
theta = 2 * np.pi * np.random.rand(n)
np.cos(theta, out=x[:, (0)])
np.sin(theta, out=x[:, (1)])
return x
Most efficient way to create an array of cos and sin in Numpy