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

Use numpy tolist() in DOS-family object as_dict() methods #2119

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

zooks97
Copy link
Contributor

@zooks97 zooks97 commented Apr 28, 2021

Use np.ndarray.tolist() method instead of python list() to convert density of state (Dos, FermiDos, CompleteDos) energies and densities in their as_dict() methods.

This fixes an issue where numpy numerical types (e.g. numpy.float64) exist in the results of {Dos, FermiDos, CompleteDos}.as_dict().

This allows these objects to be saved and stored more easily by mincePy Sci.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.6%) to 83.036% when pulling ce0a5f1 on zooks97:dos-asdict-patch into df0f9ba on materialsproject:master.

@shyuep
Copy link
Member

shyuep commented Apr 28, 2021

Thanks.

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

3 participants