Skip to content

Commit

Permalink
Merge pull request #121 from PyLops/bug-vstack
Browse files Browse the repository at this point in the history
bug: fix ncp.sum for cupy arrays not accepting lists
  • Loading branch information
mrava87 authored Dec 4, 2024
2 parents 03e3a77 + 15a462e commit 4b5283b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pylops_mpi/basicoperators/VStack.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _rmatvec(self, x: DistributedArray) -> DistributedArray:
y1 = []
for iop, oper in enumerate(self.ops):
y1.append(oper.rmatvec(x.local_array[self.nnops[iop]: self.nnops[iop + 1]]))
y1 = ncp.sum(y1, axis=0)
y1 = ncp.sum(ncp.vstack(y1), axis=0)
y[:] = self.base_comm.allreduce(y1, op=MPI.SUM)
return y

Expand Down

0 comments on commit 4b5283b

Please sign in to comment.