Skip to content

Commit 0a0139a

Browse files
committed
minor: fix type hint in laplacian
1 parent 1e23d4a commit 0a0139a

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

pylops/basicoperators/laplacian.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
from pylops import LinearOperator
55
from pylops.basicoperators import SecondDerivative
66
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+
)
814

915

1016
class Laplacian(LinearOperator):
@@ -75,8 +81,8 @@ def __init__(
7581
self,
7682
dims: InputDimsLike,
7783
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),
8086
edge: bool = False,
8187
kind: Tderivkind = "centered",
8288
dtype: DTypeLike = "float64",
@@ -112,8 +118,8 @@ def _rmatvec(self, x: NDArray) -> NDArray:
112118
def _calc_l2op(
113119
dims: InputDimsLike,
114120
axes: InputDimsLike,
115-
weights: tuple[float, ...],
116-
sampling: tuple[float, ...],
121+
weights: SamplingLike,
122+
sampling: SamplingLike,
117123
edge: bool,
118124
kind: Tderivkind,
119125
dtype: DTypeLike,

0 commit comments

Comments
 (0)