@@ -196,7 +196,7 @@ def _integrate(
196196 if type (arr ) is np .ndarray :
197197 integral = np .cumsum (arr )
198198 elif type (arr ) is torch .Tensor :
199- integral = torch .cumsum (arr , - 1 )
199+ integral = torch .cumsum (arr , - 1 ) # type: ignore
200200 else :
201201 raise TypeError ("Only ndarrays or tensors are integratable." )
202202 integral *= step
@@ -272,8 +272,8 @@ def wavefun(
272272 """Define a grid and evaluate the wavelet on it."""
273273 length = 2 ** precision
274274 # load the bounds from untyped pywt code.
275- lower_bound : float = float (self .lower_bound )
276- upper_bound : float = float (self .upper_bound )
275+ lower_bound : float = float (self .lower_bound ) # type: ignore
276+ upper_bound : float = float (self .upper_bound ) # type: ignore
277277 grid = torch .linspace (
278278 lower_bound ,
279279 upper_bound ,
@@ -292,10 +292,10 @@ def __call__(self, grid_values: torch.Tensor) -> torch.Tensor:
292292 shannon = (
293293 torch .sqrt (self .bandwidth )
294294 * (
295- torch .sin (torch .pi * self .bandwidth * grid_values ) # type: ignore
295+ torch .sin (torch .pi * self .bandwidth * grid_values )
296296 / (torch .pi * self .bandwidth * grid_values )
297297 )
298- * torch .exp (1j * 2 * torch .pi * self .center * grid_values ) # type: ignore
298+ * torch .exp (1j * 2 * torch .pi * self .center * grid_values )
299299 )
300300 return shannon
301301
@@ -307,8 +307,8 @@ def __call__(self, grid_values: torch.Tensor) -> torch.Tensor:
307307 """Return numerical values for the wavelet on a grid."""
308308 morlet = (
309309 1.0
310- / torch .sqrt (torch .pi * self .bandwidth ) # type: ignore
310+ / torch .sqrt (torch .pi * self .bandwidth )
311311 * torch .exp (- (grid_values ** 2 ) / self .bandwidth )
312- * torch .exp (1j * 2 * torch .pi * self .center * grid_values ) # type: ignore
312+ * torch .exp (1j * 2 * torch .pi * self .center * grid_values )
313313 )
314314 return morlet
0 commit comments