On 07.07.2011, at 7:16PM, Robert Pyle wrote: > .............../Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/numeric.py:1922: > RuntimeWarning: invalid value encountered in absolute > return all(less_equal(absolute(x-y), atol + rtol * absolute(y))) > > > Everything else completes with 3 KNOWNFAILs and 1 SKIP. This warning is not > new to this release; I've seen it before but haven't tried tracking it down > until today. > > It arises in allclose(). The comments state "If either array contains NaN, > then False is returned." but no test for NaN is done, and NaNs are indeed > what cause the warning. > > Inserting > > if any(isnan(x)) or any(isnan(y)): > return False > > before current line number 1916 in numeric.py seems to fix it.
The same warning is still present in the current master, I just never paid attention to it because the tests still pass (it does correctly identify NaNs because they are not less_equal the tolerance), but of course this should be properly fixed as you suggest. Cheers, Derek _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion