Replaceing np.testing.assert_allclose() calls