Skip to content

Commit

Permalink
Merge pull request #13 from CEA-MetroCarac/nischal
Browse files Browse the repository at this point in the history
seed assigning updated
  • Loading branch information
mrhxszo authored Jan 20, 2025
2 parents 05901ea + 93cbc9f commit 699221d
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 699221d

Please sign in to comment.