numpy asks for tuples
This commit is contained in:
parent
d21bf975fd
commit
c73368781b
|
|
@ -430,6 +430,7 @@ class PPP:
|
|||
sl[axis] = slice(
|
||||
self.proc_grid[key][2*axis][pos[axis]]-1,
|
||||
self.proc_grid[key][2*axis+1][pos[axis]])
|
||||
sl = tuple(sl)
|
||||
# Receive data and put it in a good spot
|
||||
if rank_src==0:
|
||||
integ[sl] += integ_local
|
||||
|
|
@ -466,6 +467,7 @@ class PPP:
|
|||
for axis in range(3):
|
||||
if not self.field[key_out].has_same_dim(field_ref,axis=axis):
|
||||
sl[axis] = slice(0,field_ref.dim(axis=axis))
|
||||
sl = tuple(sl)
|
||||
self.field[key_out].data = self.field[key_out].data[sl]
|
||||
# Copy metadata of pressure grid
|
||||
self.copy('p',key_out,skip_data=True,skip_symmetries=True)
|
||||
|
|
|
|||
Loading…
Reference in New Issue