Skip to content

Commit 0f9365b

Browse files
authored
Fixed gauss_fir to work with numpy-2 (#1150)
It's related to #1149 Signed-off-by: Jaroslav Škarvada <[email protected]>
1 parent 22dbc7f commit 0f9365b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/urh/cythonext/signal_functions.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ cdef np.ndarray[np.float32_t, ndim=1] gauss_fir(float sample_rate, uint32_t samp
238238
int(filter_width * samples_per_symbol) + 1,
239239
dtype=np.float32)
240240
cdef float ts = samples_per_symbol / sample_rate # symbol time
241-
cdef np.ndarray[np.float32_t] h = np.sqrt((2 * np.pi) / (np.log(2))) * bt / ts * np.exp(
242-
-(((np.sqrt(2) * np.pi) / np.sqrt(np.log(2)) * bt * k / samples_per_symbol) ** 2))
241+
cdef np.ndarray[np.float32_t] h = (np.sqrt((2 * np.pi) / (np.log(2))) * bt / ts * np.exp(
242+
-(((np.sqrt(2) * np.pi) / np.sqrt(np.log(2)) * bt * k / samples_per_symbol) ** 2))).astype(np.float32)
243243
return h / h.sum()
244244

245245
cdef float clamp(float x) nogil:

0 commit comments

Comments
 (0)