@@ -196,7 +196,7 @@ def _integrate(
196
196
if type (arr ) is np .ndarray :
197
197
integral = np .cumsum (arr )
198
198
elif type (arr ) is torch .Tensor :
199
- integral = torch .cumsum (arr , - 1 )
199
+ integral = torch .cumsum (arr , - 1 ) # type: ignore
200
200
else :
201
201
raise TypeError ("Only ndarrays or tensors are integratable." )
202
202
integral *= step
@@ -272,8 +272,8 @@ def wavefun(
272
272
"""Define a grid and evaluate the wavelet on it."""
273
273
length = 2 ** precision
274
274
# 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
277
277
grid = torch .linspace (
278
278
lower_bound ,
279
279
upper_bound ,
@@ -292,10 +292,10 @@ def __call__(self, grid_values: torch.Tensor) -> torch.Tensor:
292
292
shannon = (
293
293
torch .sqrt (self .bandwidth )
294
294
* (
295
- torch .sin (torch .pi * self .bandwidth * grid_values ) # type: ignore
295
+ torch .sin (torch .pi * self .bandwidth * grid_values )
296
296
/ (torch .pi * self .bandwidth * grid_values )
297
297
)
298
- * torch .exp (1j * 2 * torch .pi * self .center * grid_values ) # type: ignore
298
+ * torch .exp (1j * 2 * torch .pi * self .center * grid_values )
299
299
)
300
300
return shannon
301
301
@@ -307,8 +307,8 @@ def __call__(self, grid_values: torch.Tensor) -> torch.Tensor:
307
307
"""Return numerical values for the wavelet on a grid."""
308
308
morlet = (
309
309
1.0
310
- / torch .sqrt (torch .pi * self .bandwidth ) # type: ignore
310
+ / torch .sqrt (torch .pi * self .bandwidth )
311
311
* 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 )
313
313
)
314
314
return morlet
0 commit comments