From 2f49ef0efb18b94c2196f905e724a12b4cb14479 Mon Sep 17 00:00:00 2001 From: zimoun Date: Mon, 21 Mar 2016 08:22:11 -0300 Subject: [PATCH] fix #53 iteritems() -> items() --- krypy/recycling/factories.py | 2 +- krypy/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/krypy/recycling/factories.py b/krypy/recycling/factories.py index fab81da..8fe0162 100644 --- a/krypy/recycling/factories.py +++ b/krypy/recycling/factories.py @@ -120,7 +120,7 @@ def evaluate(_subset, _evaluations): import operator print('Timings for all successfully evaluated choices of ' 'deflation vectors with corresponding Ritz values:') - for subset, time in sorted(overall_evaluations.iteritems(), + for subset, time in sorted(overall_evaluations.items(), key=operator.itemgetter(1)): print(' {0}s: '.format(time) + ', '.join([str(el) diff --git a/krypy/utils.py b/krypy/utils.py index 2919b97..5a73cde 100644 --- a/krypy/utils.py +++ b/krypy/utils.py @@ -1405,7 +1405,7 @@ def get_ops(self, ops): '''Return timings for dictionary ops holding the operation names as keys and the number of applications as values.''' time = 0. - for op, count in ops.iteritems(): + for op, count in ops.items(): time += self.get(op) * count return time