On Mon, Sep 29, 2008 at 12:05, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > On Mon, Sep 29, 2008 at 2:00 AM, Matthieu Brucher > <[EMAIL PROTECTED]> wrote: >> >> I've tested the latest Numpy on a RHEL 4, and I got this result : >> >> Running unit tests for numpy >> NumPy version 1.2.0 >> NumPy is installed in /.../BRUCHER/local/lib/python2.5/site-packages/numpy >> Python version 2.5.2 (r252:60911, Sep 29 2008, 09:47:20) [GCC Intel(R) >> C++ gcc 3.4 mode] >> nose version 0.10.3 >> >> ...........................................................................................................................................................................................................................................................................................................................................................................................................................................FFF.............K............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ... >> >> >> ..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ctypes >> is not available on this python: skipping the test (import error was: >> ctypes is not available.) >> .No distutils available, skipping test. >> ..... >> ====================================================================== >> FAIL: test_umath.TestComplexFunctions.test_branch_cuts(<ufunc 'log'>, >> -0.5, 1j, 1, -1, True) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/data/pau112/INNO/BRUCHER/local/lib/python2.5/site-packages/nose/case.py", >> line 182, in runTest >> self.test(*self.arg) >> File >> "/data/pau112/INNO/BRUCHER/local/lib/python2.5/site-packages/numpy/core/tests/test_umath.py", >> line 333, in _check_branch_cut >> assert np.all(np.absolute(y0.imag - ym.imag*im_sign) < atol), (y0, ym) >> AssertionError: (array([-0.69314718+3.14159265j]), >> array([-0.69314718+3.14159265j])) >> >> ====================================================================== >> FAIL: test_umath.TestComplexFunctions.test_branch_cuts(<ufunc >> 'log10'>, -0.5, 1j, 1, -1, True) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/data/pau112/INNO/BRUCHER/local/lib/python2.5/site-packages/nose/case.py", >> line 182, in runTest >> self.test(*self.arg) >> File >> "/data/pau112/INNO/BRUCHER/local/lib/python2.5/site-packages/numpy/core/tests/test_umath.py", >> line 333, in _check_branch_cut >> assert np.all(np.absolute(y0.imag - ym.imag*im_sign) < atol), (y0, ym) >> AssertionError: (array([-0.30103+1.36437635j]), >> array([-0.30103+1.36437635j])) >> >> ====================================================================== >> FAIL: test_umath.TestComplexFunctions.test_branch_cuts(<ufunc >> 'log1p'>, -1.5, 1j, 1, -1, True) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/data/pau112/INNO/BRUCHER/local/lib/python2.5/site-packages/nose/case.py", >> line 182, in runTest >> self.test(*self.arg) >> File >> "/data/pau112/INNO/BRUCHER/local/lib/python2.5/site-packages/numpy/core/tests/test_umath.py", >> line 333, in _check_branch_cut >> assert np.all(np.absolute(y0.imag - ym.imag*im_sign) < atol), (y0, ym) >> AssertionError: (array([-0.69314718+3.14159265j]), >> array([-0.69314718+3.14159265j])) > > Using assert for this sort of thing is a bug, assert goes away with the -OO > options. This needs to be fixed.
These asserts are in tests. That is exactly where we are supposed to use them. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion