Skip to content

Commit 1b3ad18

Browse files
committed
bug: added AcousticWaveSolverType
1 parent 0c2e852 commit 1b3ad18

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pylops/waveeqprocessing/twoway.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__all__ = ["AcousticWave2D"]
22

3-
from typing import Tuple
3+
from typing import Any, NewType, Tuple
44

55
import numpy as np
66

@@ -15,6 +15,10 @@
1515
from examples.seismic import AcquisitionGeometry, Model
1616
from examples.seismic.acoustic import AcousticWaveSolver
1717
from examples.seismic.utils import _CustomSource
18+
else:
19+
AcousticWaveSolver = Any
20+
21+
AcousticWaveSolverType = NewType("AcousticWaveSolver", AcousticWaveSolver)
1822

1923

2024
class AcousticWave2D(LinearOperator):
@@ -285,7 +289,7 @@ def srcillumination_allshots(self, savewav: bool = False) -> None:
285289
self.src_wavefield.append(src_wav)
286290
self.src_illumination += src_ill
287291

288-
def _born_oneshot(self, solver: AcousticWaveSolver, dm: NDArray) -> NDArray:
292+
def _born_oneshot(self, solver: AcousticWaveSolverType, dm: NDArray) -> NDArray:
289293
"""Born modelling for one shot
290294
291295
Parameters

0 commit comments

Comments
 (0)