Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quiet keyword in Model class #123

Open
gds38 opened this issue Dec 6, 2019 · 0 comments
Open

quiet keyword in Model class #123

gds38 opened this issue Dec 6, 2019 · 0 comments

Comments

@gds38
Copy link

gds38 commented Dec 6, 2019

Should it be possible to set "quiet" as a kwarg in the Model class? I'd like to change it from the default False. The last piece of code in the init function makes it look like it's possible:

    # Check the initial prior value
    quiet = kwargs.get("quiet", False)
    if not quiet and not np.isfinite(self.log_prior()):
        raise ValueError("non-finite log prior value") 

...but the preceding section (if len(kwargs:) raises the ValueError if you have set quiet as a kwarg:

    else:
        # Loop over the kwargs and set the parameter values
        params = []
        for k in self.parameter_names:
            v = kwargs.pop(k, None)
            if v is None:
                raise ValueError("missing parameter '{0}'".format(k))
            params.append(v)
        self.parameter_vector = params

        if len(kwargs):
            raise ValueError("unrecognized parameter(s) '{0}'"
                             .format(list(kwargs.keys())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant