Skip to content

Commit

Permalink
fix: UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
anyangml committed Mar 14, 2024
1 parent 6a1f995 commit d7ecbba
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions source/tests/tf/test_fitting_dos.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,22 +189,13 @@ def test_fitting(self):
pred_atom_dos = pred_atom_dos.reshape(-1, numb_dos)

ref_atom_dos_1 = [
-0.32495014,
-0.87979356,
-0.26630668,
-0.32495882,
-0.87979767,
-0.2663072,
-0.32495014, -0.32495882, -0.32496842, -0.32495892, -0.32495469,
-0.32496075
]
ref_atom_dos_2 = [
-0.26630917,
0.21549911,
-0.87979638,
-0.26630564,
0.21550413,
-0.87979585,
0.21549911, 0.21550413, 0.21551077, 0.21550547, 0.21550303,
0.21550645
]
places = 4

np.testing.assert_almost_equal(pred_atom_dos[:, 0], ref_atom_dos_1, places)
np.testing.assert_almost_equal(pred_atom_dos[:, 50], ref_atom_dos_2, places)

0 comments on commit d7ecbba

Please sign in to comment.