mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-02 08:13:05 +08:00
Fix TypeError: must use keyword argument for key function on Python 3
This commit is contained in:
committed by
Stefan van der Walt
parent
92aed3673f
commit
d65b2fb06a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user