From 6445499349251405a98d92f61394da033d7fd597 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Thu, 6 Feb 2020 17:10:52 +0100 Subject: [PATCH] Enable overriding of kwargs in SerialDataHandling.run_kernel --- pystencils/datahandling/serial_datahandling.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pystencils/datahandling/serial_datahandling.py b/pystencils/datahandling/serial_datahandling.py index be586488d..a9fca34e3 100644 --- a/pystencils/datahandling/serial_datahandling.py +++ b/pystencils/datahandling/serial_datahandling.py @@ -9,7 +9,8 @@ from pystencils.datahandling.datahandling_interface import DataHandling from pystencils.datahandling.pycuda import PyCudaArrayHandler from pystencils.datahandling.pyopencl import PyOpenClArrayHandler from pystencils.field import ( - Field, FieldType, create_numpy_array_with_layout, layout_string_to_tuple, spatial_layout_string_to_tuple) + Field, FieldType, create_numpy_array_with_layout, layout_string_to_tuple, + spatial_layout_string_to_tuple) from pystencils.slicing import normalize_slice, remove_ghost_layers from pystencils.utils import DotDict @@ -239,7 +240,7 @@ class SerialDataHandling(DataHandling): def run_kernel(self, kernel_function, **kwargs): arrays = self.gpu_arrays if kernel_function.ast.backend in self._GPU_LIKE_BACKENDS else self.cpu_arrays - kernel_function(**arrays, **kwargs) + kernel_function(**{**arrays, **kwargs}) def get_kernel_kwargs(self, kernel_function, **kwargs): result = {} -- GitLab