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

change detX constraint to use rescale_eigenvalues #297

Open
charlesmartin14 opened this issue Oct 13, 2023 · 0 comments
Open

change detX constraint to use rescale_eigenvalues #297

charlesmartin14 opened this issue Oct 13, 2023 · 0 comments

Comments

@charlesmartin14
Copy link
Member

TO make the code clearer, we should change:

def detX_constraint(evals, rescale=True):
  ...
    
    if rescale:
        Wnorm = np.sqrt(np.sum(evals))
        Wscale = np.sqrt(num_evals)/Wnorm 
        evals = (Wscale*Wscale)*evals

To use rescale_eigenvalues() directly


def detX_constraint(evals, rescale=True):
  ...
    
    if rescale:
        evals = rescale_eigenvalues(evals)

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