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