Skip to content

Commit

Permalink
Don't include a deep copy of the Model in the Solution object
Browse files Browse the repository at this point in the history
  • Loading branch information
mwshinn committed Jul 2, 2023
1 parent 78e056f commit 3eec613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyddm/solution.py
Expand Up @@ -80,7 +80,7 @@ def __init__(self, pdf_choice_upper, pdf_choice_lower, model, conditions, pdf_un
- `pdf_undec` - a size M numpy ndarray describing the final state of the simulation. None if unavailable.
- `pdf_evolution` - a size M-by-N numpy ndarray describing the state of the simulation at each time step. None if unavailable.
"""
self.model = copy.deepcopy(model) # TODO this could cause a memory leak if I forget it is there...
self.model = model # If the model changes, this var will change too. So create local versions of important variables below.
self.choice_upper = pdf_choice_upper
self.choice_lower = pdf_choice_lower
self.undec = pdf_undec
Expand Down

0 comments on commit 3eec613

Please sign in to comment.