y = 1.000002
np.testing.assert_almost_equal(x, y)
np.testing.assert_almost_equal(x, y, 5)
np.testing.assert_almost_equal([x, x, x], [y, y, y], 5)
np.testing.assert_almost_equal((x, x, x), (y, y, y), 5)
assertAlmostEqual in Python unit-test for collections of floats