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 bug in Simulation.eps_bounds with CustomMedium #779

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

tylerflex
Copy link
Collaborator

@weiliangjin2021 not sure how this bug got in, but it was breaking plotting with CustomMedium. I think this is the only area that needs fixing but maybe you can confirm. Thanks

@tylerflex tylerflex added the 1.10 label Mar 22, 2023
@tylerflex tylerflex self-assigned this Mar 22, 2023
@weiliangjin2021
Copy link
Collaborator

It seems to be removed in a commit fix errors caught by pylint 2.16.1. Previously it was eps_min = min(eps_min, min(eps_component.real.values.ravel())).

@weiliangjin2021
Copy link
Collaborator

weiliangjin2021 commented Mar 22, 2023

do you think np.min(eps_component.real.values.ravel()) will somtimes return dataarray type so that it will error at min(float, dataarray)? It occurs here

float(np.min(eps_array.real))
when float is removed.

@tylerflex
Copy link
Collaborator Author

do you think np.min(eps_component.real.values.ravel()) will somtimes return dataarray type so that it will error at min(float, dataarray)?

Isn't .values always a np.ndarray? or can it be a dataarray?

@weiliangjin2021
Copy link
Collaborator

You are right. Feel free to merge.

@tylerflex tylerflex merged commit 81c9e58 into pre/1.10.0 Mar 22, 2023
@tylerflex tylerflex deleted the fix/eps_bounds branch March 22, 2023 19:29
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 this pull request may close these issues.

None yet

2 participants