Checking that the components of sample_spherical sum to the singular speed provided, or the array of speeds provided (assert x = np.sqrt(x**2, axis=0))
Checking that the number of dimensions returned equals the number of dimensions y = sample_spherical(npoints, speed, ndim) assert y.shape[0] == ndim
Test should include:
y = sample_spherical(npoints, speed, ndim) assert y.shape[0] == ndim