|
4 | 4 | from pylops import LinearOperator |
5 | 5 | from pylops.basicoperators import SecondDerivative |
6 | 6 | from pylops.utils.backend import get_normalize_axis_index |
7 | | -from pylops.utils.typing import DTypeLike, InputDimsLike, NDArray, Tderivkind |
| 7 | +from pylops.utils.typing import ( |
| 8 | + DTypeLike, |
| 9 | + InputDimsLike, |
| 10 | + NDArray, |
| 11 | + SamplingLike, |
| 12 | + Tderivkind, |
| 13 | +) |
8 | 14 |
|
9 | 15 |
|
10 | 16 | class Laplacian(LinearOperator): |
@@ -75,8 +81,8 @@ def __init__( |
75 | 81 | self, |
76 | 82 | dims: InputDimsLike, |
77 | 83 | axes: InputDimsLike = (-2, -1), |
78 | | - weights: tuple[float, ...] = (1.0, 1.0), |
79 | | - sampling: tuple[float, ...] = (1.0, 1.0), |
| 84 | + weights: SamplingLike = (1.0, 1.0), |
| 85 | + sampling: SamplingLike = (1.0, 1.0), |
80 | 86 | edge: bool = False, |
81 | 87 | kind: Tderivkind = "centered", |
82 | 88 | dtype: DTypeLike = "float64", |
@@ -112,8 +118,8 @@ def _rmatvec(self, x: NDArray) -> NDArray: |
112 | 118 | def _calc_l2op( |
113 | 119 | dims: InputDimsLike, |
114 | 120 | axes: InputDimsLike, |
115 | | - weights: tuple[float, ...], |
116 | | - sampling: tuple[float, ...], |
| 121 | + weights: SamplingLike, |
| 122 | + sampling: SamplingLike, |
117 | 123 | edge: bool, |
118 | 124 | kind: Tderivkind, |
119 | 125 | dtype: DTypeLike, |
|
0 commit comments