[skimage] 06/24: Fix `TypeError: must use keyword argument for key function` on Python 3

Andreas Tille tille at debian.org
Fri Dec 23 08:22:18 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to tag v0.3.1
in repository skimage.

commit d65b2fb06aca4af5f716f9e0730acd6986643fbf
Author: cgohlke <cgohlke at uci.edu>
Date:   Mon Oct 10 13:19:46 2011 -0700

    Fix `TypeError: must use keyword argument for key function` on Python 3
---
 scikits/image/transform/tests/test_hough_transform.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scikits/image/transform/tests/test_hough_transform.py b/scikits/image/transform/tests/test_hough_transform.py
index 175c1b3..1359315 100644
--- a/scikits/image/transform/tests/test_hough_transform.py
+++ b/scikits/image/transform/tests/test_hough_transform.py
@@ -61,7 +61,7 @@ def test_probabilistic_hough():
     sorted_lines = []
     for line in lines:
         line = list(line)
-        line.sort(lambda x,y: cmp(x[0], y[0]))
+        line.sort(key=lambda x: x[0])
         sorted_lines.append(line)
     assert([(25, 75), (74, 26)] in sorted_lines)
     assert([(25, 25), (74, 74)] in sorted_lines)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/skimage.git



More information about the debian-science-commits mailing list