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

gray_indicator() returns incorrect type #1299

Closed
Chuban opened this issue Jul 23, 2020 · 1 comment · Fixed by #1427
Closed

gray_indicator() returns incorrect type #1299

Chuban opened this issue Jul 23, 2020 · 1 comment · Fixed by #1427

Comments

@Chuban
Copy link
Contributor

Chuban commented Jul 23, 2020

A typo in gray_indicator() (python/adjoint/filters.py) is causing it to return an array. The doc string indicates that this was intended to return a float. I suspect that
return np.mean(4 * x.flatten()) * (1-x.flatten()) * 100
should be
return np.mean(4 * x.flatten() * (1-x.flatten())) * 100

@stevengj
Copy link
Collaborator

That sounds right. Care to contribute a PR?

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

Successfully merging a pull request may close this issue.

2 participants