Commit 5320a78b authored by Martin Bauer's avatar Martin Bauer
Browse files

Swap by default now swaps data on the default target

parent 6f8ff7ad
......@@ -197,7 +197,9 @@ class SerialDataHandling(DataHandling):
arr.flags.writeable = False
return arr
def swap(self, name1, name2, gpu=False):
def swap(self, name1, name2, gpu=None):
if gpu is None:
gpu = self.default_target == "gpu"
arr = self.gpu_arrays if gpu else self.cpu_arrays
arr[name1], arr[name2] = arr[name2], arr[name1]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment