Skip to content

Commit

Permalink
clean up document headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
v0lta committed Feb 2, 2024
1 parent 37d0d31 commit 0234789
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/ptwt/_stationary_transform.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""This module implements stationary wavelet transforms."""

# Created by the pytorch wavelet toolbox team, in 2024

from typing import List, Optional, Union

import pywt
Expand Down
1 change: 0 additions & 1 deletion src/ptwt/conv_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
This module treats boundaries with edge-padding.
"""

# Created by moritz wolter, 14.04.20
from typing import List, Optional, Sequence, Tuple, Union, cast

import pywt
Expand Down
2 changes: 0 additions & 2 deletions src/ptwt/conv_transform_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
The functions here are based on torch.nn.functional.conv3d and it's transpose.
"""

# Written by the Pytorch wavelet toolbox team in 2024

from functools import partial
from typing import Dict, List, Optional, Sequence, Tuple, Union, cast

Expand Down
1 change: 0 additions & 1 deletion src/ptwt/matmul_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
of boundary filters in "Ripples in Mathematics" section 10.3 .
"""

# Created by moritz (wolter@cs.uni-bonn.de) at 14.04.20
import sys
from typing import List, Optional, Union

Expand Down
1 change: 0 additions & 1 deletion src/ptwt/matmul_transform_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
This module uses boundary filters to minimize padding.
"""

# Written by moritz ( @ wolter.tech ) in 2021
import sys
from functools import partial
from typing import List, Optional, Tuple, Union, cast
Expand Down
2 changes: 0 additions & 2 deletions src/ptwt/packets.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Compute analysis wavelet packet representations."""

# Created on Fri Apr 6 2021 by moritz (wolter@cs.uni-bonn.de)

import collections
from functools import partial
from itertools import product
Expand Down
1 change: 0 additions & 1 deletion src/ptwt/sparse_math.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Efficiently construct fwt operations using sparse matrices."""

# Written by moritz ( @ wolter.tech ) 17.09.21
from itertools import product
from typing import List

Expand Down
2 changes: 0 additions & 2 deletions src/ptwt/wavelets_learnable.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
See https://arxiv.org/pdf/2004.09569.pdf for more information.
"""

# Created by moritz wolter@cs.uni-bonn.de, 14.05.20
# Inspired by Ripples in Mathematics, Jensen and La Cour-Harbo, Chapter 7.7
# import pywt
from abc import ABC, abstractmethod
from typing import Tuple

Expand Down
8 changes: 3 additions & 5 deletions tests/test_swt.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import pywt
import torch

# from ptwt._stationary_transform import _iswt, _swt
from src.ptwt._stationary_transform import _iswt, _swt
from ptwt._stationary_transform import _iswt, _swt


@pytest.mark.parametrize("level", [1, 2, None])
Expand Down Expand Up @@ -37,10 +36,9 @@ def test_iswt_1d(level: Optional[int], size: int, wavelet: str) -> None:
assert np.allclose(rec.numpy(), signal)


# TODO: test beyond 2d.
@pytest.mark.parametrize("size", [[32, 64], [32, 128], [3, 32, 256]])
@pytest.mark.parametrize("wavelet", ["db1", "db2", "sym5"])
@pytest.mark.parametrize("level", [1, 2, 3]) # TODO: None
@pytest.mark.parametrize("wavelet", ["db1", "db2", "sym3"])
@pytest.mark.parametrize("level", [1, 2, 3]) # None needs more work.
@pytest.mark.parametrize("axis", [1, -1])
def test_swt_1d_slow(level: Optional[int], size: int, wavelet: str, axis: int) -> None:
"""Test the 1d swt."""
Expand Down

0 comments on commit 0234789

Please sign in to comment.