[SciPy-user] A good way to test an array is zero to within numerical accuracy?
Russell E. Owen
Fri Jan 23 17:29:07 CST 2009
I recommend numpy.allclose
iCy-fLaME <firstname.lastname@example.org> 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.
More information about the SciPy-user