[SciPy-user] unittests for scipy.stats: assert_almost_equal question

eric eric at scipy.org
Sun Jan 20 21:38:03 CST 2002


Hey Louis,

> Hmmm, I think that I would like to be testing in terms of
> significant digits as opposed to decimal places, especially when
> working with floating point.

We need both in different situations.

> Since you are asking for such a test,
> here it is.

Thanks.  In my cursory checks, it looks to me like you've counted digits
correctly.  I'll add this to scipy_test.  Does anyone have better names for
these.  They are quite arbitrary and indistinguishable right now.  How
about:

assert_significant_equal
assert_decimal_equal

These names give a little more info about what is happening in the function.

thoughts?

eric





More information about the SciPy-user mailing list