Skip to content

Commit

Permalink
Fix a deprecation warning in CheckOutputFiles.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsvu committed Feb 2, 2023
1 parent 4bd0445 commit 3244515
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/CheckOutputFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ def check_h5_file(self, h5_file, test_entity, expected_entity):
test_data.dtype, expected_data.dtype,
"test and expected h5 datasets must have identical"
" types.")
if (test_data.dtype == np.dtype(np.float) or
test_data.dtype == np.dtype(np.complexfloating)):
if (test_data.dtype == float
or test_data.dtype == complex):
npt.assert_allclose(test_data[:, column_mask],
expected_data[:, column_mask],
rtol=self.relative_tolerance,
atol=self.absolute_tolerance)
else:
self.unit_test.assertEqual(test_data, expected_data)
else:
if (test_data.dtype == np.dtype(np.float) or
test_data.dtype == np.dtype(np.complexfloating)):
if (test_data.dtype == float
or test_data.dtype == complex):
npt.assert_allclose(test_data[:, column_mask],
0.0,
rtol=self.relative_tolerance,
Expand Down

0 comments on commit 3244515

Please sign in to comment.