Skip to content

Commit

Permalink
fix: pass parameters by name
Browse files Browse the repository at this point in the history
  • Loading branch information
paquiteau committed Feb 5, 2024
1 parent fc36139 commit 62b519a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modopt/opt/linear/wavelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def __init__(self,
**kwargs):

if compute_backend == "cupy" and ptwt_available:
self.operator = CupyWaveletTransform(wavelet_name, shape, level, mode)
self.operator = CupyWaveletTransform(wavelet=wavelet_name, shape=shape, level=level, mode=mode)
elif compute_backend == "numpy" and pywt_available:
self.operator = CPUWaveletTransform(wavelet_name = wavelet_name,shape= shape,nb_scales=level, **kwargs)
self.operator = CPUWaveletTransform(wavelet_name=wavelet_name, shape=shape, nb_scales=level, **kwargs)
else:
raise ValueError(f"Compute Backend {compute_backend} not available")

Expand Down Expand Up @@ -417,7 +417,7 @@ def __init__(
self.shape = shape
self.mode = mode

self.operator = TorchWaveletTransform(shape, wavelet, level, mode)
self.operator = TorchWaveletTransform(shape=shape, wavelet=wavelet, level=level,mode=mode)

def op(self, data: cp.array) -> cp.ndarray:
"""Define the wavelet operator.
Expand Down

0 comments on commit 62b519a

Please sign in to comment.