diff --git a/pystencils_tests/test_blocking.py b/pystencils_tests/test_blocking.py index 579ba41997cec4990ad4da00ae811cdb0b564bd2..b2b815b1a317d9f3228e9cc780c66336f378f782 100644 --- a/pystencils_tests/test_blocking.py +++ b/pystencils_tests/test_blocking.py @@ -19,7 +19,7 @@ def check_equivalence(assignments, src_arr): with_blocking = ps.create_kernel(assignments, cpu_blocking=(8, 16, 4), cpu_openmp=openmp, cpu_vectorize_info=vectorization).compile() without_blocking = ps.create_kernel(assignments).compile() - print(" openmp {}, vectorization {}".format(openmp, vectorization)) + print(f" openmp {openmp}, vectorization {vectorization}") dst_arr = np.zeros_like(src_arr) ref_arr = np.zeros_like(src_arr) np.copyto(src_arr, np.random.rand(*src_arr.shape)) diff --git a/pystencils_tests/test_interpolation.py b/pystencils_tests/test_interpolation.py index 477765bb31289dbfdc48927e3cc55f10d49f16a0..19201c7c9016be156f2ed73828eb65f1b9d6d229 100644 --- a/pystencils_tests/test_interpolation.py +++ b/pystencils_tests/test_interpolation.py @@ -125,7 +125,7 @@ def test_rotate_interpolation_gpu(dtype, address_mode, use_textures): else: lenna_gpu = gpuarray.to_gpu( np.ascontiguousarray(lenna, dtype)) - x_f, y_f = pystencils.fields('x,y: %s [2d]' % type_map[dtype], ghost_layers=0) + x_f, y_f = pystencils.fields(f'x,y: {type_map[dtype]} [2d]', ghost_layers=0) transformed = scale * \ sympy.rot_axis3(rotation_angle)[:2, :2] * sympy.Matrix((x_, y_)) - sympy.Matrix([2, 2]) @@ -173,7 +173,7 @@ def test_shift_interpolation_gpu(address_mode, dtype, use_textures): lenna_gpu = gpuarray.to_gpu( np.ascontiguousarray(lenna, dtype)) - x_f, y_f = pystencils.fields('x,y: %s [2d]' % type_map[dtype], ghost_layers=0) + x_f, y_f = pystencils.fields(f'x,y: {type_map[dtype]} [2d]', ghost_layers=0) if use_textures: transformed = scale * sympy.rot_axis3(rotation_angle)[:2, :2] * sympy.Matrix((x_, y_)) + shift diff --git a/pystencils_tests/test_loop_cutting.py b/pystencils_tests/test_loop_cutting.py index 0291074b87c051bcf381883e474078c663274ac1..daf803cbdab91417671dff53ae18561ed3df6011 100644 --- a/pystencils_tests/test_loop_cutting.py +++ b/pystencils_tests/test_loop_cutting.py @@ -112,7 +112,7 @@ def test_staggered_iteration_manual(): def test_staggered_gpu(): dim = 2 - f = ps.fields("f: double[{dim}D]".format(dim=dim)) + f = ps.fields(f"f: double[{dim}D]") s = ps.fields("s({dim}): double[{dim}D]".format(dim=dim), field_type=FieldType.STAGGERED) expressions = [(f[0, 0] + f[-1, 0]) / 2, (f[0, 0] + f[0, -1]) / 2]