Skip to content

Commit

Permalink
Fixed bug with random number generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
vrettasm committed Aug 3, 2020
1 parent 3a43992 commit 4f9a14e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/src/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import numpy as np
import pandas as pd
from numpy.random import default_rng, SeedSequence

from .hydraulic_conductivity import HydraulicConductivity
from .models.vanGenuchten import vanGenuchten
Expand Down Expand Up @@ -63,9 +64,9 @@ def __init__(self, name=None, seed=None):

# Create a random number generator.
if seed is not None:
self.rng = np.random.default_rng(seed)
self.rng = default_rng(SeedSequence(seed))
else:
self.rng = np.random.default_rng()
self.rng = default_rng()
# _end_if_

# Place holder for the pde model.
Expand Down

0 comments on commit 4f9a14e

Please sign in to comment.