Skip to content

Commit

Permalink
use numpy allclose as more stable comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Jun 30, 2021
1 parent bfce30b commit f0c6fc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion emmet-core/emmet/core/vasp/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ def from_task_doc(
diff_ldau_params = {
el: (input_set_hubbards.get(el, 0), input_hubbards.get(el, 0))
for el in all_elements
if input_set_hubbards.get(el) != input_hubbards.get(el)
if not np.allclose(
input_set_hubbards.get(el, 0), input_hubbards.get(el, 0)
)
}

if len(diff_ldau_params) > 0:
Expand Down

0 comments on commit f0c6fc8

Please sign in to comment.