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

ENH/Bug cov_params, generalize, avoid ValueError #1730

Closed
josef-pkt opened this issue Jun 3, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@josef-pkt
Copy link
Member

commented Jun 3, 2014

insufficient refactoring when cov_params_default was added

        if cov_p is None and self.normalized_cov_params is None:
            raise ValueError('need covariance of parameters for computing '
                             '(unnormalized) covariances')

another improvement:
short-circuit if no arguments are given and we just want cov_params(). There is no need for checking all cases if all arguments are None.

I assume we don't have a subclass yet that does not define normalized_cov_params, so no error or failure so far.

@josef-pkt

This comment has been minimized.

Copy link
Member Author

commented Jun 18, 2014

there is not really much to short_circuit, it just goes through a few if and ends up returning cov_p

PR in #1772

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.