diff options
author | David Seifert <soap@gentoo.org> | 2016-09-05 10:08:49 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-09-05 11:19:07 +0200 |
commit | 37e723a40bbc8e99ccfca71c62c7a86542186c56 (patch) | |
tree | 327435508f53e8e86c35fb77c14f82ea0eb204c5 /dev-python/algopy | |
parent | dev-cpp/threadpool: Remove deprecated ebuild (diff) | |
download | gentoo-37e723a40bbc8e99ccfca71c62c7a86542186c56.tar.gz gentoo-37e723a40bbc8e99ccfca71c62c7a86542186c56.tar.bz2 gentoo-37e723a40bbc8e99ccfca71c62c7a86542186c56.zip |
dev-python/algopy: Add py3.5 support
* EAPI=6
* Fix one error in testsuite by
backporting upstream fix
https://github.com/b45ch1/algopy/commit/f563d86e72b32caa296ac77b0836ce0e36a5f6ab
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-python/algopy')
-rw-r--r-- | dev-python/algopy/algopy-0.5.3.ebuild | 7 | ||||
-rw-r--r-- | dev-python/algopy/files/algopy-0.5.3-fix-test-cast-ufunc.patch | 29 |
2 files changed, 33 insertions, 3 deletions
diff --git a/dev-python/algopy/algopy-0.5.3.ebuild b/dev-python/algopy/algopy-0.5.3.ebuild index 900facfc5559..3597aa272ca8 100644 --- a/dev-python/algopy/algopy-0.5.3.ebuild +++ b/dev-python/algopy/algopy-0.5.3.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=5 +EAPI=6 -PYTHON_COMPAT=( python2_7 python3_{3,4} ) +PYTHON_COMPAT=( python2_7 python3_{3,4,5} ) inherit distutils-r1 @@ -24,6 +24,7 @@ RDEPEND=" DEPEND="${RDEPEND} test? ( dev-python/nose[${PYTHON_USEDEP}] ) " +PATCHES=( "${FILESDIR}/${P}-fix-test-cast-ufunc.patch" ) python_test() { ${EPYTHON} run_tests.py || die diff --git a/dev-python/algopy/files/algopy-0.5.3-fix-test-cast-ufunc.patch b/dev-python/algopy/files/algopy-0.5.3-fix-test-cast-ufunc.patch new file mode 100644 index 000000000000..0b8a0eda5080 --- /dev/null +++ b/dev-python/algopy/files/algopy-0.5.3-fix-test-cast-ufunc.patch @@ -0,0 +1,29 @@ +From f563d86e72b32caa296ac77b0836ce0e36a5f6ab Mon Sep 17 00:00:00 2001 +From: Sebastian Walter <sebastian.walter@iwr.uni-heidelberg.de> +Date: Thu, 30 Jun 2016 15:11:19 +0200 +Subject: [PATCH] Problem: numpy raised TypeError: Cannot cast ufunc add output + from dtype('complex128') to dtype('float64') with casting rule 'same_kind' + Solution: use numpy.add(x,y,out=x, casting='unsafe') to cast from complex to + float if necessary + +--- + algopy/utpm/algorithms.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/algopy/utpm/algorithms.py b/algopy/utpm/algorithms.py +index ccf7ca4..5f2651e 100644 +--- a/algopy/utpm/algorithms.py ++++ b/algopy/utpm/algorithms.py +@@ -1190,9 +1190,9 @@ def _dot(cls, x_data, y_data, out = None): + for d in range(D): + for p in range(P): + for c in range(d+1): +- z_data[d,p,...] += numpy.dot( +- x_data[c,p,...], +- y_data[d-c,p,...]) ++ tmp = numpy.dot(x_data[c,p,...], ++ y_data[d-c,p,...]) ++ numpy.add(z_data[d,p,...], tmp, out=z_data[d,p, ...], casting='unsafe') + + return out + |