Python Materials Genomics (pymatgen) is a robust materials analysis code that defines classes for structures and molecules with support for many electronic structure codes. It powers the Materials Project.
Assert fails with numerical imprecision with floats:
Use assert_allclose or one of the nulp (number of floating point values) functions for these cases instead:
Summary
==
to compare float, to fix #4158assert_array_equal
on int array:_proj
implementation, ~3x speedup==
(list/tuple/dict ...): https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/tests/core/test_bonds.py#L56