[Numpy-discussion] Test failures on FreeBSD buildbot

David Cournapeau david@ar.media.kyoto-u.ac...
Mon Jul 27 23:48:27 CDT 2009

Charles R Harris wrote:
> I'd just look at the difference and see if it exceeded some fraction
> of the expected value. There is the problem of zero, which could be
> handled in the usual way as diff < abserr + relerr. I think abserr
> would need to be a new keyword with a default value. Since the relerr
> is specified by digits you probably need 1/10**digits, but there
> should be no problem with that. Really, only a multiplication should
> be needed to determine the precision to x digits.

Ok, I will have a shot at this.

> Nan and +/- inf need to be special cased but I haven't thought about that.

They are a constant source of frustration. It is like it defies my
brain, and I end up doing very stupid things after working for too long
with nan and inf, especially when complex numbers are involved :)

> I agree that the broadcasting is both a convenience and a trap here,
> but its probably a bit late to change that.

I thought about having an additional assert_exactly_equal: both
arguments will need to have the same shape and type (dtype for arrays),
negative zero and positive zero will be different as well.

I also have another function which may be useful in one of my scipy
branch for scipy.special: having the max error in term of ULPS.



More information about the NumPy-Discussion mailing list