Skip to content

Commit

Permalink
Make atom_amount future proof
Browse files Browse the repository at this point in the history
Otherwise we may get this warning:
FutureWarning: elementwise comparison failed; returning scalar instead,
but in the future will perform elementwise comparison
  • Loading branch information
wangenau committed Nov 5, 2020
1 parent b5cbf6f commit 87d350b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion var_mesh/gen_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,5 @@ def atom_amount(mol):
amount = {}
for ia in range(mol.natm):
symb = mol.atom_symbol(ia)
amount[symb] = sum(i.count(symb) for i in mol.atom)
amount[symb] = sum(i[0].count(symb) for i in mol.atom)
return amount

0 comments on commit 87d350b

Please sign in to comment.