diff options
author | Justin Lecher <jlec@gentoo.org> | 2013-02-24 16:33:39 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2013-02-24 16:33:39 +0000 |
commit | ea69fd271694426cffaec3090788198d6374bc86 (patch) | |
tree | 2be68dded4348caa7fed835d332fbd4fea0719ba /dev-python/numpy | |
parent | Drop versionator eclass as it's not needed for a long time, also fixes bug #4... (diff) | |
download | gentoo-2-ea69fd271694426cffaec3090788198d6374bc86.tar.gz gentoo-2-ea69fd271694426cffaec3090788198d6374bc86.tar.bz2 gentoo-2-ea69fd271694426cffaec3090788198d6374bc86.zip |
dev-python/numpy: Backport fix for test failure (test_pareto) on 32bit systems, #447502
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 8009D6F070EB7916)
Diffstat (limited to 'dev-python/numpy')
-rw-r--r-- | dev-python/numpy/ChangeLog | 6 | ||||
-rw-r--r-- | dev-python/numpy/files/numpy-1.6.2-test-pareto.patch | 45 | ||||
-rw-r--r-- | dev-python/numpy/metadata.xml | 12 | ||||
-rw-r--r-- | dev-python/numpy/numpy-1.6.2-r2.ebuild | 6 | ||||
-rw-r--r-- | dev-python/numpy/numpy-1.6.2.ebuild | 6 |
5 files changed, 64 insertions, 11 deletions
diff --git a/dev-python/numpy/ChangeLog b/dev-python/numpy/ChangeLog index 4e17b8ecd9a6..5acf7c6ade45 100644 --- a/dev-python/numpy/ChangeLog +++ b/dev-python/numpy/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/numpy # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.188 2013/02/19 20:17:28 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.189 2013/02/24 16:33:39 jlec Exp $ + + 24 Feb 2013; Justin Lecher <jlec@gentoo.org> numpy-1.6.2.ebuild, + numpy-1.6.2-r2.ebuild, +files/numpy-1.6.2-test-pareto.patch, metadata.xml: + Backport fix for test failure (test_pareto) on 32bit systems, #447502 *numpy-1.7.0 (19 Feb 2013) diff --git a/dev-python/numpy/files/numpy-1.6.2-test-pareto.patch b/dev-python/numpy/files/numpy-1.6.2-test-pareto.patch new file mode 100644 index 000000000000..7d67b49071c6 --- /dev/null +++ b/dev-python/numpy/files/numpy-1.6.2-test-pareto.patch @@ -0,0 +1,45 @@ +From d01354e52d5c272522c09ffd733887500e4846d7 Mon Sep 17 00:00:00 2001 +From: "Nathaniel J. Smith" <njs@pobox.com> +Date: Fri, 7 Sep 2012 10:49:45 +0100 +Subject: [PATCH] FIX: loosen numerical tolerance in test_pareto() + +The problem was that in 32bit Ubuntu 12.04, one gets the following: + +> +/home/njs/numpy/.tox/py27/local/lib/python2.7/site-packages/numpy/random/tests/test_random.py(363)test_pareto() +-> np.testing.assert_array_almost_equal(actual, desired, decimal=15) +(Pdb) actual[1, 0] +52828779.702948704 +(Pdb) desired[1, 0] +52828779.702948518 + +and the test was comparing the numbers to 1e-14, which obviously +failed. + +Fixes #424. +--- + numpy/random/tests/test_random.py | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py +index 7d9163e..ee40cce 100644 +--- a/numpy/random/tests/test_random.py ++++ b/numpy/random/tests/test_random.py +@@ -310,7 +310,13 @@ def test_pareto(self): + desired = np.array([[ 2.46852460439034849e+03, 1.41286880810518346e+03], + [ 5.28287797029485181e+07, 6.57720981047328785e+07], + [ 1.40840323350391515e+02, 1.98390255135251704e+05]]) +- np.testing.assert_array_almost_equal(actual, desired, decimal=14) ++ # For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this ++ # matrix differs by 24 nulps. Discussion: ++ # http://mail.scipy.org/pipermail/numpy-discussion/2012-September/063801.html ++ # Consensus is that this is probably some gcc quirk that affects ++ # rounding but not in any important way, so we just use a looser ++ # tolerance on this test: ++ np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30) + + def test_poisson(self): + np.random.seed(self.seed) +-- +1.7.10 + diff --git a/dev-python/numpy/metadata.xml b/dev-python/numpy/metadata.xml index bb330b7fd39b..0bfafa1af2f6 100644 --- a/dev-python/numpy/metadata.xml +++ b/dev-python/numpy/metadata.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>sci</herd> -<herd>python</herd> -<longdescription lang="en"> + <herd>sci</herd> + <herd>python</herd> + <longdescription lang="en"> NumPy is a general-purpose array-processing Python package designed to efficiently manipulate large multi-dimensional arrays of arbitrary records without sacrificing too much speed for small multi-dimensional @@ -11,7 +11,7 @@ basic linear algebra and random number generation. It is the successor of Numeric and numarray. </longdescription> -<upstream> - <remote-id type="pypi">numpy</remote-id> -</upstream> + <upstream> + <remote-id type="pypi">numpy</remote-id> + </upstream> </pkgmetadata> diff --git a/dev-python/numpy/numpy-1.6.2-r2.ebuild b/dev-python/numpy/numpy-1.6.2-r2.ebuild index 321c57272f24..dfe09e4ab0bc 100644 --- a/dev-python/numpy/numpy-1.6.2-r2.ebuild +++ b/dev-python/numpy/numpy-1.6.2-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.6.2-r2.ebuild,v 1.4 2013/02/19 15:34:06 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.6.2-r2.ebuild,v 1.5 2013/02/24 16:33:39 jlec Exp $ EAPI=5 @@ -61,7 +61,9 @@ pc_libs() { } python_prepare_all() { - epatch "${FILESDIR}"/${PN}-1.6.1-atlas.patch + epatch \ + "${FILESDIR}"/${PN}-1.6.1-atlas.patch \ + "${FILESDIR}"/${P}-test-pareto.patch if use lapack; then append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)" diff --git a/dev-python/numpy/numpy-1.6.2.ebuild b/dev-python/numpy/numpy-1.6.2.ebuild index 47baf933fda6..492e743dd3d7 100644 --- a/dev-python/numpy/numpy-1.6.2.ebuild +++ b/dev-python/numpy/numpy-1.6.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.6.2.ebuild,v 1.15 2013/02/19 15:34:06 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.6.2.ebuild,v 1.16 2013/02/24 16:33:39 jlec Exp $ EAPI=4 @@ -89,7 +89,9 @@ pc_libs() { } src_prepare() { - epatch "${FILESDIR}"/${PN}-1.6.1-atlas.patch + epatch \ + "${FILESDIR}"/${PN}-1.6.1-atlas.patch \ + "${FILESDIR}"/${P}-test-pareto.patch if use lapack; then append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)" |