@@ -46,7 +46,7 @@ def zero_padding(
4646 return xnew , ynew
4747
4848
49- @check_1d_arrays (x_dtype = np . inexact , x_evenly_spaced = True , y_dtype = np . inexact )
49+ @check_1d_arrays (x_evenly_spaced = True )
5050def fft1d (
5151 x : np .ndarray , y : np .ndarray , shift : bool = True
5252) -> tuple [np .ndarray , np .ndarray ]:
@@ -70,12 +70,7 @@ def fft1d(
7070 return f , sp
7171
7272
73- @check_1d_arrays (
74- x_dtype = np .inexact ,
75- x_sorted = False ,
76- x_evenly_spaced = False ,
77- y_dtype = np .complexfloating ,
78- )
73+ @check_1d_arrays (x_evenly_spaced = False , x_sorted = False , y_dtype = np .complexfloating )
7974def ifft1d (
8075 f : np .ndarray , sp : np .ndarray , initial : float = 0.0
8176) -> tuple [np .ndarray , np .ndarray ]:
@@ -116,7 +111,7 @@ def ifft1d(
116111 return x , y .real
117112
118113
119- @check_1d_arrays (x_dtype = np . inexact , x_evenly_spaced = True , y_dtype = np . inexact )
114+ @check_1d_arrays (x_evenly_spaced = True )
120115def magnitude_spectrum (
121116 x : np .ndarray , y : np .ndarray , log_scale : bool = False
122117) -> tuple [np .ndarray , np .ndarray ]:
@@ -138,7 +133,7 @@ def magnitude_spectrum(
138133 return x1 , y_mag
139134
140135
141- @check_1d_arrays (x_dtype = np . inexact , x_evenly_spaced = True , y_dtype = np . inexact )
136+ @check_1d_arrays (x_evenly_spaced = True )
142137def phase_spectrum (x : np .ndarray , y : np .ndarray ) -> tuple [np .ndarray , np .ndarray ]:
143138 """Compute phase spectrum.
144139
@@ -154,7 +149,7 @@ def phase_spectrum(x: np.ndarray, y: np.ndarray) -> tuple[np.ndarray, np.ndarray
154149 return x1 , y_phase
155150
156151
157- @check_1d_arrays (x_dtype = np . inexact , x_evenly_spaced = True , y_dtype = np . inexact )
152+ @check_1d_arrays (x_evenly_spaced = True )
158153def psd (
159154 x : np .ndarray , y : np .ndarray , log_scale : bool = False
160155) -> tuple [np .ndarray , np .ndarray ]:
@@ -189,6 +184,7 @@ def sort_frequencies(x: np.ndarray, y: np.ndarray) -> np.ndarray:
189184 return freqs [np .argsort (fourier )]
190185
191186
187+ @check_1d_arrays (x_evenly_spaced = True )
192188def brickwall_filter (
193189 x : np .ndarray ,
194190 y : np .ndarray ,
0 commit comments