Skip to content

Commit

Permalink
Fix linting and update methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanbabbar04 committed Mar 28, 2024
1 parent 5a8affe commit 3cafe0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pylops_mpi/basicoperators/Gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class MPIGradient(MPIStackedLinearOperator):
pushed into the :py:class:`pylops_mpi.basicoperators.MPIBlockDiag` operator.
Finally, using the :py:class:`pylops_mpi.basicoperators.MPIStackedVStack` we vertically
stack the :py:class:`pylops_mpi.basicoperators.MPIFirstDerivative` and the
stack the :py:class:`pylops_mpi.basicoperators.MPIFirstDerivative` and the
:py:class:`pylops_mpi.basicoperators.MPIBlockDiag` operators.
For the forward mode, the matrix vector product is performed between the
Expand Down Expand Up @@ -93,10 +93,10 @@ def __init__(self,
super().__init__(shape=self.Op.shape, dtype=dtype, base_comm=base_comm)

def _matvec(self, x: DistributedArray) -> StackedDistributedArray:
return self.Op @ x
return self.Op._matvec(x)

def _rmatvec(self, x: StackedDistributedArray) -> DistributedArray:
return self.Op.H @ x
return self.Op._rmatvec(x)

def _calc_stack_op(self, ndims):
local_dims = local_split(tuple(self.dims), self.base_comm, Partition.SCATTER, axis=0)
Expand Down

0 comments on commit 3cafe0a

Please sign in to comment.