diff --git a/loopy/kernel/creation.py b/loopy/kernel/creation.py index 7edf43e43bceb6ee3622f3645ad37c4375a703e0..1daa041c54a17214b6531751cf206878e6b1e676 100644 --- a/loopy/kernel/creation.py +++ b/loopy/kernel/creation.py @@ -1,10 +1,6 @@ """UI for kernel creation.""" -from __future__ import division -from __future__ import absolute_import -import six -from six.moves import range -from six.moves import zip +from __future__ import division, absolute_import, print_function __copyright__ = "Copyright (C) 2012 Andreas Kloeckner" @@ -36,6 +32,9 @@ from loopy.kernel.data import ( import islpy as isl from islpy import dim_type +import six +from six.moves import range, zip + import re import sys @@ -904,9 +903,10 @@ def guess_arg_shape_if_requested(kernel, default_order): armap.access_range, i) + 1, constants_only=False))) except: - print>>sys.stderr, "While trying to find shape axis %d of "\ - "argument '%s', the following " \ - "exception occurred:" % (i, arg.name) + print("While trying to find shape axis %d of " + "argument '%s', the following " + "exception occurred:" % (i, arg.name), + file=sys.stderr) raise shape = tuple(shape)