Commit 06124196 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

to satisfy the flake8 linter

parent 06aeddba
Pipeline #27124 passed with stage
in 17 minutes and 16 seconds
......@@ -44,14 +44,15 @@ def _fix_length_one_slices(slices):
if slices.stop is not None and abs(slices.start - slices.stop) == 1:
return slices.start
elif slices.stop is None and slices.start == -1:
return -1 # [-1:] also has length one
return -1 # [-1:] also has length one
else:
return slices
else:
return tuple(_fix_length_one_slices(s) for s in slices)
def get_communication_slices(stencil, comm_stencil=None, streaming_pattern='pull', after_timestep='both', ghost_layers=1):
def get_communication_slices(
stencil, comm_stencil=None, streaming_pattern='pull', after_timestep='both', ghost_layers=1):
"""
Return the source and destination slices for periodicity handling or communication between blocks.
......@@ -153,4 +154,4 @@ class PeriodicityHandling:
arr[dst] = arr[src]
def _periodicity_handling_gpu(self, timestep):
raise NotImplementedError()
\ No newline at end of file
raise NotImplementedError()
......@@ -39,11 +39,13 @@ def get_accessor(streaming_pattern, timestep) -> PdfFieldAccessor:
else:
return odd_accessors[streaming_pattern]
def is_inplace(streaming_pattern):
if streaming_pattern not in streaming_patterns:
raise ValueError('Invalid streaming pattern', streaming_pattern)
return streaming_pattern in ['aa', 'esotwist']
return streaming_pattern in ['aa', 'esotwist']
def numeric_offsets(field_access: ps.Field.Access):
return tuple(int(o) for o in field_access.offsets)
......
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