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

np.(arange->linspace) in io/vasp/optics.py get_delta, get_setp and epsilon_imag #3286

Merged
merged 3 commits into from
Aug 31, 2023

Conversation

LucasGVerga
Copy link
Contributor

@LucasGVerga LucasGVerga commented Aug 31, 2023

np.linspace ensures the array size is numerically stable. See the numpy.arange warning.

LucasGVerga and others added 3 commits August 31, 2023 14:24
…y for get_delta, get_step, and epsilon_imag. The lenght of the array generated by numpy.arange is not numerically stable (see https://numpy.org/doc/stable/reference/generated/numpy.arange.html) and can be different from NEDOS.
Changing numpy.arange to numpy.linspace in the io/vasp/optics.py to avoid numerical instabilities.
@janosh janosh changed the title Change to io/vasp/optics.py np.(arange->linspace) in io/vasp/optics.py get_delta, get_setp and epsilon_imag Aug 31, 2023
@janosh janosh added vasp Vienna Ab initio Simulation Package io Input/output functionality fix Bug fix PRs labels Aug 31, 2023
@janosh janosh merged commit 79237b2 into materialsproject:master Aug 31, 2023
22 checks passed
@janosh
Copy link
Member

janosh commented Aug 31, 2023

Thanks @LucasGVerga!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PRs io Input/output functionality vasp Vienna Ab initio Simulation Package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants