test/helpers: using numpy.allclose() to check the equality of arrays in tests