stan-dev/pystan — pull request #27 by shoyer (2013-11-09 08:37:44+00:00)
Title: Fix-up random seeds: consistency and unit tests

All random seeds are now checked (and only checked) by misc._check_seed, which now also allows for np.random.RandomState objects.

Permutations of samples should now be determined by the seed given to model.sampler, not the np.random global state.

There are now unit tests for misc._check_seed and to verify that the model output is exactly reproduced, given the same seed.

Note: I haven't actually run these tests yet since it's a bit of a pain to compile pystan, but they are pretty simple so I think there is a decent chance they will just work when Travis CI tries them.