[Numpy-discussion] ANN: NumPy 1.2.0

Charles R Harris charlesr.harris@gmail....
Mon Sep 29 12:12:58 CDT 2008


On Mon, Sep 29, 2008 at 11:09 AM, Robert Kern <robert.kern@gmail.com> wrote:

> On Mon, Sep 29, 2008 at 12:05, Charles R Harris
> <charlesr.harris@gmail.com> wrote:
> >
> >
> > On Mon, Sep 29, 2008 at 2:00 AM, Matthieu Brucher
> > <matthieu.brucher@gmail.com> 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.
>

Wrong, asserts are for debugging, not for general tests. Using them will
give incorrect results when running the tests. This tends to be a problem on
windows platforms. It needs to be fixed.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080929/4b9fe6f3/attachment-0001.html 


More information about the Numpy-discussion mailing list