Skip to content

Commit

Permalink
fix: annotation and _hsinterp not class method
Browse files Browse the repository at this point in the history
  • Loading branch information
cako committed Jan 15, 2023
1 parent caff340 commit ec3555f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pylops/signalprocessing/nonstatconvolve1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def __init__(
axis: int = -1,
dtype: DTypeLike = "float64",
name: str = "C",
) -> LinearOperator:
) -> None:
if hs.shape[1] % 2 == 0:
raise ValueError("filters hs must have odd length")
if len(np.unique(np.diff(ih))) > 1:
Expand All @@ -111,11 +111,13 @@ def __init__(
@property
def hsinterp(self):
ncp = get_array_module(self.hs)
_hsinterp = ncp.empty((self.dims[self.axis], self.hsize), dtype=self.dtype)
self._hsinterp = ncp.empty((self.dims[self.axis], self.hsize), dtype=self.dtype)

for ix in range(self.dims[self.axis]):
_hsinterp[ix] = self._interpolate_h(self.hs, ix, self.oh, self.dh, self.nh)
return _hsinterp
self._hsinterp[ix] = self._interpolate_h(
self.hs, ix, self.oh, self.dh, self.nh
)
return self._hsinterp

@hsinterp.deleter
def hsinterp(self):
Expand Down

0 comments on commit ec3555f

Please sign in to comment.