Skip to content

Commit

Permalink
minor: fix missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
mrava87 committed Mar 8, 2024
1 parent 90f61fc commit cc98e9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pylops_mpi/optimization/basic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, Tuple, Callable
from typing import Callable, Optional, Tuple, Union

from pylops.utils import NDArray
from pylops_mpi import MPILinearOperator, DistributedArray, StackedDistributedArray
Expand Down
8 changes: 4 additions & 4 deletions pylops_mpi/optimization/cls_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def setup(
self._print_setup(np.iscomplexobj(x.local_array))
return x

def step(self, x: Union[DistributedArray, StackedDistributedArray],
def step(self, x: Union[DistributedArray, StackedDistributedArray],
show: bool = False
) -> Union[DistributedArray, StackedDistributedArray]:
r"""Run one step of solver
Expand Down Expand Up @@ -311,7 +311,7 @@ def setup(self,
y : :obj:`pylops_mpi.DistributedArray` or :obj:`pylops_mpi.StackedDistributedArray`
Data of size :math:`[N \times 1]`
x0 : :obj:`pylops_mpi.DistributedArray` or :obj:`pylops_mpi.StackedDistributedArray`, optional
Initial guess of size (M,). If ``None``, Defaults to a zero vector
Initial guess of size (M,). If ``None``, Defaults to a zero vector
(will always default to :obj:`pylops_mpi.DistributedArray`)
niter : :obj:`int`, optional
Number of iterations (default to ``None`` in case a user wants to
Expand Down Expand Up @@ -364,7 +364,7 @@ def setup(self,
self._print_setup(np.iscomplexobj(x.local_array))
return x

def step(self, x: Union[DistributedArray, StackedDistributedArray],
def step(self, x: Union[DistributedArray, StackedDistributedArray],
show: bool = False
) -> Union[DistributedArray, StackedDistributedArray]:
r"""Run one step of solver
Expand Down Expand Up @@ -481,7 +481,7 @@ def solve(self,
y : :obj:`pylops_mpi.DistributedArray` or :obj:`pylops_mpi.StackedDistributedArray`
Data of size (N, )
x0 : :obj:`pylops_mpi.DistributedArray` or :obj:`pylops_mpi.StackedDistributedArray`
Initial guess of size (M, ). If ``None``, initialize internally as zero vector
Initial guess of size (M, ). If ``None``, initialize internally as zero vector
(will always default to :obj:`pylops_mpi.DistributedArray`)
niter : :obj:`int`, optional
Number of iterations (default to ``None`` in case a user wants to
Expand Down

0 comments on commit cc98e9c

Please sign in to comment.