Add random seeds to tests per #1044 Additionally, change all `np.random.random` to `np.random.rand` calls, as the former are not affected by `np.random.seed`.