From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D58CB138330 for ; Mon, 5 Sep 2016 09:21:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8458721C153; Mon, 5 Sep 2016 09:21:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE9B621C153 for ; Mon, 5 Sep 2016 09:20:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C5A163408EC for ; Mon, 5 Sep 2016 09:20:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B66E32478 for ; Mon, 5 Sep 2016 09:20:54 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1473067147.37e723a40bbc8e99ccfca71c62c7a86542186c56.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/algopy/, dev-python/algopy/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/algopy/algopy-0.5.3.ebuild dev-python/algopy/files/algopy-0.5.3-fix-test-cast-ufunc.patch X-VCS-Directories: dev-python/algopy/files/ dev-python/algopy/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 37e723a40bbc8e99ccfca71c62c7a86542186c56 X-VCS-Branch: master Date: Mon, 5 Sep 2016 09:20:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 405a9593-09a8-4505-a884-784aef9fbfc7 X-Archives-Hash: 0788d5210713bd5aa88896819ff1ac35 commit: 37e723a40bbc8e99ccfca71c62c7a86542186c56 Author: David Seifert gentoo org> AuthorDate: Mon Sep 5 08:08:49 2016 +0000 Commit: David Seifert gentoo org> CommitDate: Mon Sep 5 09:19:07 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37e723a4 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 dev-python/algopy/algopy-0.5.3.ebuild | 7 +++--- .../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 900facf..3597aa2 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 00000000..0b8a0ed --- /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 +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 +