Skip to content

Commit

Permalink
seed assigning updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhxszo committed Jan 20, 2025
1 parent 4e204df commit 93cbc9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cdsaxs/fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,10 @@ def do_verbose(Sampler):
# Assign the seed given to user if the format is correct
if seed is not None:
if isinstance(seed, int) and seed >= 0:
np.random.seed(seed)
np.random.default_rng(seed)
else:
raise ValueError("Seed must be a non-negative integer.")
np.random.default_rng()

if not hasattr(sigma, '__len__'):
sigma = [sigma] * N
Expand Down

0 comments on commit 93cbc9f

Please sign in to comment.