Better tests error msg in Scan and should fix the buildbot failure in float32.

The numpy.allclose() use a tolerate too high for float32.
Support python object in the comparison.

This is needed in the Scan tests.