Skip to content

Commit 316b241

Browse files
committed
Merging from main
1 parent eef348c commit 316b241

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pylops_mpi/basicoperators/BlockDiag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ def __init__(self, ops: Sequence[MPILinearOperator], base_comm: MPI.Comm = MPI.C
170170
dtype: Optional[DTypeLike] = None):
171171
self.ops = ops
172172
dtype = _get_dtype(self.ops) if dtype is None else np.dtype(dtype)
173-
shape = (int(np.sum(op.shape[0] for op in ops)),
174-
int(np.sum(op.shape[1] for op in ops)))
173+
shape = (int(sum(op.shape[0] for op in ops)),
174+
int(sum(op.shape[1] for op in ops)))
175175
super().__init__(shape=shape, dtype=dtype, base_comm=base_comm)
176176

177177
def _matvec(self, x: StackedDistributedArray) -> StackedDistributedArray:

pylops_mpi/basicoperators/VStack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def __init__(self, ops: Sequence[MPILinearOperator],
183183
self.ops = ops
184184
if len(set(op.shape[1] for op in ops)) > 1:
185185
raise ValueError("Operators have different number of columns")
186-
shape = (int(np.sum(op.shape[0] for op in ops)), ops[0].shape[1])
186+
shape = (int(sum(op.shape[0] for op in ops)), ops[0].shape[1])
187187
dtype = _get_dtype(self.ops) if dtype is None else np.dtype(dtype)
188188
super().__init__(shape=shape, dtype=dtype, base_comm=base_comm)
189189

0 commit comments

Comments
 (0)