[SciPy-user] A good way to test an array is zero to within numerical accuracy?

Russell E. Owen rowen@u.washington....
Fri Jan 23 17:29:07 CST 2009

I recommend numpy.allclose

-- Russell

In article 
 iCy-fLaME <icy.flame.gm@gmail.com> wrote:

> What would be a good way to test an array is zero everywhere to within
> numerical accuracy? Such that, plus minus 0x1 for the float's
> significand is as good as 0x0.
> The test must be able to cope with both single and double floats,
> because they are given at run time.
> Thanks in advance.
> iCy

More information about the SciPy-user mailing list