Skip to content

Commit 1913a7b

Browse files
replace dict comprehension in registration.py for py2.6 compat
Fixes #97.
1 parent 5f97979 commit 1913a7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/thunder/imgprocessing/registration.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ def load(file):
230230
transClass = getattr(importlib.import_module('thunder.imgprocessing.transformation'), className)
231231

232232
# instantiate the transformations and construct the model
233-
transformations = {int(k): transClass(**v) for k, v in input['transformations'].iteritems()}
233+
transformations = {}
234+
for k, v in input['transformations'].iteritems():
235+
transformations[int(k)] = transClass(**v)
234236
model = RegistrationModel(transformations, regMethod=regMethod, transClass=className)
235237
return model
236238

0 commit comments

Comments
 (0)