Skip to content
Snippets Groups Projects
Commit ffc85a5d authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Merge branch 'fix_grid_dict_default' into 'master'

Fixed issue with mutable default argument

See merge request !596
parents 61740404 e1bbab27
No related branches found
No related tags found
1 merge request!596Fixed issue with mutable default argument
Pipeline #79344 passed
......@@ -36,7 +36,7 @@ def grid_file_name(outdir, label, gzip=False):
class Grid(object):
def __init__(self, likelihood=None, priors=dict(), grid_size=101,
def __init__(self, likelihood=None, priors=None, grid_size=101,
save=False, label='no_label', outdir='.', gzip=False):
"""
......@@ -60,6 +60,8 @@ class Grid(object):
Set whether to gzip the output grid file
"""
if priors is None:
priors = dict()
self.likelihood = likelihood
self.priors = PriorDict(priors)
self.n_dims = len(priors)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment