Skip to content

Commit 153f9f2

Browse files
committed
lint.
1 parent 1f7a6f0 commit 153f9f2

27 files changed

+50
-21
lines changed

noxfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module implements our CI function calls."""
2+
23
import nox
34

45

src/ptwt/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Differentiable and gpu enabled fast wavelet transforms in PyTorch."""
2+
23
from ._util import Wavelet
34
from .continuous_transform import cwt
45
from .conv_transform import wavedec, waverec

src/ptwt/_stationary_transform.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This module implements stationary wavelet transforms."""
2+
23
# Created by moritz wolter, in 2024
34

45
from typing import List, Optional, Union

src/ptwt/_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Utility methods to compute wavelet decompositions from a dataset."""
2+
23
from typing import Any, Callable, List, Optional, Protocol, Sequence, Tuple, Union
34

45
import numpy as np

src/ptwt/continuous_transform.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
This module is based on pywt's cwt implementation.
44
"""
5+
56
# Written by the Pytorch wavelet toolbox team in 2024
67
from typing import Any, Tuple, Union
78

src/ptwt/conv_transform.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
This module treats boundaries with edge-padding.
44
"""
5+
56
# Created by moritz wolter, 14.04.20
67
from typing import List, Optional, Sequence, Tuple, Union
78

src/ptwt/conv_transform_2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
The implementation relies on torch.nn.functional.conv2d and
44
torch.nn.functional.conv_transpose2d under the hood.
55
"""
6+
67
# Written by the Pytorch wavelet toolbox team in 2024
78

89

src/ptwt/conv_transform_3.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
The functions here are based on torch.nn.functional.conv3d and it's transpose.
44
"""
5+
56
# Written by the Pytorch wavelet toolbox team in 2024
67

78
from functools import partial
@@ -212,7 +213,10 @@ def wavedec3(
212213

213214
def _waverec3d_fold_channels_3d_list(
214215
coeffs: List[Union[torch.Tensor, Dict[str, torch.Tensor]]],
215-
) -> Tuple[List[Union[torch.Tensor, Dict[str, torch.Tensor]]], List[int],]:
216+
) -> Tuple[
217+
List[Union[torch.Tensor, Dict[str, torch.Tensor]]],
218+
List[int],
219+
]:
216220
# fold the input coefficients for processing conv2d_transpose.
217221
fold_coeffs: List[Union[torch.Tensor, Dict[str, torch.Tensor]]] = []
218222
ds = list(_check_if_tensor(coeffs[0]).shape)

src/ptwt/matmul_transform.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
in Strang Nguyen (p. 32), as well as the description
77
of boundary filters in "Ripples in Mathematics" section 10.3 .
88
"""
9+
910
# Created by moritz (wolter@cs.uni-bonn.de) at 14.04.20
1011
import sys
1112
from typing import List, Optional, Union
@@ -281,7 +282,7 @@ def _construct_analysis_matrices(
281282
f"level {curr_level}, the current signal length {curr_length} is "
282283
f"smaller than the filter length {filt_len}. Therefore, the "
283284
"transformation is only computed up to the decomposition level "
284-
f"{curr_level-1}.\n"
285+
f"{curr_level - 1}.\n"
285286
)
286287
break
287288

@@ -563,7 +564,7 @@ def _construct_synthesis_matrices(
563564
f"level {curr_level}, the current signal length {curr_length} is "
564565
f"smaller than the filter length {filt_len}. Therefore, the "
565566
"transformation is only computed up to the decomposition level "
566-
f"{curr_level-1}.\n"
567+
f"{curr_level - 1}.\n"
567568
)
568569
break
569570

src/ptwt/matmul_transform_2.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
This module uses boundary filters to minimize padding.
44
"""
5+
56
# Written by moritz ( @ wolter.tech ) in 2021
67
import sys
78
from functools import partial
@@ -364,7 +365,8 @@ def _construct_analysis_matrices(
364365
f". At level {curr_level}, at least one of the current signal "
365366
f"height and width ({current_height}, {current_width}) is smaller "
366367
f"then the filter length {filt_len}. Therefore, the transformation "
367-
f"is only computed up to the decomposition level {curr_level-1}.\n"
368+
f"is only computed up to the decomposition "
369+
f" level {curr_level - 1}.\n"
368370
)
369371
break
370372
# the conv matrices require even length inputs.
@@ -678,7 +680,8 @@ def _construct_synthesis_matrices(
678680
f". At level {curr_level}, at least one of the current signal "
679681
f"height and width ({current_height}, {current_width}) is smaller "
680682
f"then the filter length {filt_len}. Therefore, the transformation "
681-
f"is only computed up to the decomposition level {curr_level-1}.\n"
683+
f"is only computed up to the "
684+
f" decomposition level {curr_level - 1}.\n"
682685
)
683686
break
684687
current_height, current_width, pad_tuple = _matrix_pad_2(

0 commit comments

Comments
 (0)