There's an ``assert_allclose`` in numpy.testing for this