From 33d64b5abfd0373f5a04e7b84067ad1953bec110 Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Mon, 9 Dec 2019 09:56:15 +0100 Subject: [PATCH] another sorting port for Python3 --- examples/demos/correlate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/demos/correlate.py b/examples/demos/correlate.py index 1b65722d6..f7ff13f29 100644 --- a/examples/demos/correlate.py +++ b/examples/demos/correlate.py @@ -6,7 +6,7 @@ # tabula rasa first scene.RemoveAll() - +import functools import ost.img.alg as img_alg from ost.mol.alg import EntityToDensityRosetta, HIGH_RESOLUTION sdh=io.LoadPDB('data/sdh-complete.pdb') @@ -77,7 +77,7 @@ def Visualize(candidates): return 0 else: return 1 - candidates=sorted(candidates, cmp_correl) + candidates=sorted(candidates, key=functools.cmp_to_key(cmp_correl)) # create render objects and add to scene for index, candidate in enumerate(candidates): -- GitLab