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

Fix CUQIpy conditioning variables being extracted from private variables #289

Closed
nabriis opened this issue Oct 9, 2023 · 0 comments · Fixed by #309
Closed

Fix CUQIpy conditioning variables being extracted from private variables #289

nabriis opened this issue Oct 9, 2023 · 0 comments · Fixed by #309
Assignees
Labels
bug Something isn't working

Comments

@nabriis
Copy link
Collaborator

nabriis commented Oct 9, 2023

Update utilities to this:

def get_indirect_variables(dist):
    attributes = []
    for attribute in dist.get_mutable_variables():
        value = getattr(dist, attribute)
        if callable(value):
            keys = get_non_default_args(value)
            for key in keys:
                if key not in attributes: #Ensure we did not already find this key
                    attributes.append(key)
    return attributes 
@nabriis nabriis added the bug Something isn't working label Oct 10, 2023
chaozg added a commit that referenced this issue Nov 9, 2023
…bles

fix get_indirect_variables as suggested in issue #289
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants