From b07bac1066a69567f4942d63233bc425ef1e02ef Mon Sep 17 00:00:00 2001 From: Tiago Freitas Pereira <tiagofrepereira@gmail.com> Date: Mon, 19 Nov 2018 19:27:05 +0100 Subject: [PATCH] Python 3 compatibility --- bob/db/cuhk_cufsf/models.py | 2 +- bob/db/cuhk_cufsf/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bob/db/cuhk_cufsf/models.py b/bob/db/cuhk_cufsf/models.py index 46fe8d4..8559665 100644 --- a/bob/db/cuhk_cufsf/models.py +++ b/bob/db/cuhk_cufsf/models.py @@ -129,7 +129,7 @@ class File(Base, bob.db.base.File): modality_choices = ('photo', 'sketch') - id = Column(String(100), primary_key=True, autoincrement=True) + id = Column(String(100), primary_key=True) path = Column(String(100), unique=True) client_id = Column(Integer, ForeignKey('client.id')) modality = Column(Enum(*modality_choices)) diff --git a/bob/db/cuhk_cufsf/utils.py b/bob/db/cuhk_cufsf/utils.py index e88560f..fc6f520 100644 --- a/bob/db/cuhk_cufsf/utils.py +++ b/bob/db/cuhk_cufsf/utils.py @@ -88,7 +88,7 @@ class FERETWrapper(): clients = range(1,1195) world = 700 dev = 494 - numpy.random.shuffle(clients) + numpy.random.shuffle(list(clients)) return clients[0:world], clients[world:world+dev] @@ -109,7 +109,7 @@ class FERETWrapper(): world = 350 dev = 350 test = 494 - numpy.random.shuffle(clients) + numpy.random.shuffle(list(clients)) return clients[0:world], clients[world:world+dev], clients[world+dev:world+dev+test] -- GitLab