Skip to content

Commit

Permalink
Tweak datatype of string from CASTEP reader
Browse files Browse the repository at this point in the history
Now that the doc test has moved to newer Python/Numpy versions we have
a doctest failure where numpy string types are unexpectedly
encountered.
  • Loading branch information
ajjackson committed Jul 17, 2024
1 parent 6f950c2 commit 2210ffa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion euphonic/readers/castep.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def read_phonon_dos_data(
_, idx = np.unique(atom_type, return_index=True)
unique_types = atom_type[np.sort(idx)]
for i, species in enumerate(unique_types):
dos_dict[species] = dos_data[:, i + 2]/dos_conv
dos_dict[str(species)] = dos_data[:, i + 2]/dos_conv

return data_dict

Expand Down

0 comments on commit 2210ffa

Please sign in to comment.