I've haven't found any clean way. So I'll use "numpy.allclose" in my doctests.

It will be harder to read, less interactive-session-like, but it might show the
reader how compare floats properly.

On Fri, Oct 15, 2010 at 2:05 PM, Fabrice Silva <si...@lma.cnrs-mrs.fr> wrote:
> Maybe you should not rely on doctest to do the comparison between
> computed and expected result. You could use assert_* functions from
> http://docs.scipy.org/doc/numpy/reference/routines.testing.html

I didn't knew about them, they might prove useful too, thanks!

Cheers
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to