Skip to content
Snippets Groups Projects
Commit a6754c61 authored by Martin Bauer's avatar Martin Bauer
Browse files

Fixed Numpy tuple indexing warnings

parent 7b72936f
No related merge requests found
...@@ -136,7 +136,7 @@ def add_ghost_layers(arr, index_dimensions=0, ghost_layers=1, layout=None): ...@@ -136,7 +136,7 @@ def add_ghost_layers(arr, index_dimensions=0, ghost_layers=1, layout=None):
result.fill(0.0) result.fill(0.0)
indexing = [slice(ghost_layers, -ghost_layers, None), ] * spatial_dimensions indexing = [slice(ghost_layers, -ghost_layers, None), ] * spatial_dimensions
indexing += [slice(None, None, None)] * index_dimensions indexing += [slice(None, None, None)] * index_dimensions
result[indexing] = arr result[tuple(indexing)] = arr
return result return result
......
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