[NumPy-Tickets] [NumPy] #1987: polyfit and basic arithmetic function errors with clang on Mac OS X Lion
NumPy Trac
numpy-tickets@scipy....
Wed Nov 23 16:13:54 CST 2011
#1987: polyfit and basic arithmetic function errors with clang on Mac OS X Lion
--------------------+-------------------------------------------------------
Reporter: deil | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: devel
Keywords: |
--------------------+-------------------------------------------------------
I get two test failures of 2.0.0.dev-7f302cc with clang.
Furthermore I get a MismatchCAPIWarning when building numpy, which results
in a {{{"Using deprecated NumPy API"}}} when building scipy.
The full build and test logs are attached.
See http://mail.scipy.org/pipermail/scipy-user/2011-November/031042.html
System info:
{{{
Mac OS X Lion 10.7.2 (11C74)
XCode 4.2.1 (4D502)
$ which python; python
/opt/local/bin/python
Python 2.7.2 (default, Nov 23 2011, 11:40:08)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on
darwin
$ which clang; clang --version
/usr/bin/clang
Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
$ which gfortran; gfortran --version
/opt/local/bin/gfortran
GNU Fortran (GCC) 4.4.6
}}}
Test warning and failures:
{{{
/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/ma/core.py:4778: RuntimeWarning: invalid value encountered
in power
np.power(out, 0.5, out=out, casting='unsafe')
======================================================================
FAIL: Test basic arithmetic function errors
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/core/tests/test_numeric.py", line 319, in
test_floating_exceptions
lambda a,b:a*b, ft_tiny, ft_tiny)
File "/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/core/tests/test_numeric.py", line 270, in assert_raises_fpe
"Type %s did not raise fpe error '%s'." % (ftype, fpeerr))
File "/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/testing/utils.py", line 34, in assert_
raise AssertionError(msg)
AssertionError: Type <type 'numpy.complex64'> did not raise fpe error ''.
======================================================================
FAIL: Tests polyfit
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/ma/tests/test_extras.py", line 622, in test_polyfit
assert_almost_equal(a, a_)
File "/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/ma/testutils.py", line 155, in assert_almost_equal
err_msg=err_msg, verbose=verbose)
File "/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/ma/testutils.py", line 221, in assert_array_almost_equal
header='Arrays are not almost equal')
File "/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/ma/testutils.py", line 186, in assert_array_compare
verbose=verbose, header=header)
File "/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/testing/utils.py", line 677, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal
(mismatch 100.0%)
x: array([ 4.25134878, 1.14131297, 0.20519666, 0.01701 ])
y: array([ 1.9345248 , 0.49711011, 0.10202554, 0.00928034])
}}}
MismatchCAPIWarning in numpy build:
{{{
numpy/core/setup_common.py:86: MismatchCAPIWarning: API mismatch detected,
the C API version numbers have to be updated. Current C api version is 6,
with checksum eb54c77ff4149bab310324cd7c0cb176, but recorded checksum for
C API version 6 in codegen_dir/cversions.txt is
e61d5dc51fa1c6459328266e215d6987. If functions were added in the C API,
you have to update C_API_VERSION in numpy/core/setup_common.py.
MismatchCAPIWarning)
}}}
Warning in scipy build:
{{{
/Users/deil/Library/Python/2.7/lib/python/site-
packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning:
#warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API" [-W#warnings]
}}}
I also see this C API Warning on a Linux machine. Is this a bug in numpy
or an installation problem on my side? Does it have any consequences on
numpy / scipy working properly?
The polyfit failure apparently is known, on the mailing list Charles
Harris wrote:
"Don't worry about this one, it comes from Travis changing the unmasked
version of polyfit which changes the singular values, etc."
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1987>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list