Re: [Numpy-discussion] Error in allclose with inf values

2007-08-20 Thread Stefan van der Walt
Hi Matthew On Fri, Aug 17, 2007 at 01:11:41PM +0100, Matthew Brett wrote: > I noticed that allclose does not always behave correctly for arrays with infs. > > I've attached a test script for allclose, and here's an alternative > implementation that I believe behaves correctly. Thanks for the pat

Re: [Numpy-discussion] Error in allclose with inf values

2007-08-19 Thread Matthew Brett
Hi again, > I noticed that allclose does not always behave correctly for arrays with infs. Sorry, perhaps I should have been more specific; this is the behavior of allclose that I was referring to (documented in the tests I attached): In [6]:N.allclose([N.inf, 1, 2], [10, 10, N.inf]) Out[6]:arra

[Numpy-discussion] Error in allclose with inf values

2007-08-17 Thread Matthew Brett
Hi, I noticed that allclose does not always behave correctly for arrays with infs. I've attached a test script for allclose, and here's an alternative implementation that I believe behaves correctly. Obviously the test script could be a test case in core/tests/test_numeric.py I wonder if we sho