Skip to content

Commit 186af3a

Browse files
committed
fix: Fixed failing test
1 parent 9c04583 commit 186af3a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pylops_mpi/basicoperators/MatrixMult.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ def block_gather(x: DistributedArray, orig_shape: Tuple[int, int], comm: MPI.Com
169169
pr, pc = divmod(rank, p_prime)
170170
rs, cs = pr * br, pc * bc
171171
re, ce = min(rs + br, nr), min(cs + bc, nc)
172-
C[rs:re, cs:ce] = all_blks[rank].reshape(re - rs, cs - ce)
172+
if len(all_blks[rank]) !=0:
173+
C[rs:re, cs:ce] = all_blks[rank].reshape(re - rs, cs - ce)
173174
return C
174175

175176

0 commit comments

Comments
 (0)