proteneer / timemachine

Differentiate all the things!
Other
138 stars 17 forks source link

Avoid setting global numpy PRNG seed #1302

Closed mcwitt closed 3 months ago

mcwitt commented 3 months ago

Since #1294, the default HREX implementation no longer relies on numpy global PRNG state. This PR modifies the signature of attempt_neighbor_swaps_fast to accept an explicit seed rather than generating one using numpy.random and removes an associated warning.

Minor unrelated change: explicitly declare integer dtypes for proposed and accepted count arrays

proteneer commented 3 months ago

awesome!

mcwitt commented 3 months ago

Also noticed an unrelated bug (fixed in https://github.com/proteneer/timemachine/pull/1302/commits/4587c3d7932ae1075c429e15c6b088ba0ba1ed07) that I think resulted in water_sampling_params always being None in the test