From 5315a05f01d389d3bb3ab181f7e655f56e4b2be7 Mon Sep 17 00:00:00 2001 From: Johannes Demel Date: Tue, 20 Dec 2022 12:21:14 +0100 Subject: [PATCH] deprecate: Fix NumPy deprecation warnings NumPy puts out deprecation warnings in situations where aliases to built-in types are used. Thus, we switch to built-in types. Signed-off-by: Johannes Demel --- python/qa_sc_delay_corr.py | 2 +- python/qa_sc_tagger.py | 2 +- python/qa_xcorr_tagger.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/qa_sc_delay_corr.py b/python/qa_sc_delay_corr.py index 35c34cd..fdf0fda 100755 --- a/python/qa_sc_delay_corr.py +++ b/python/qa_sc_delay_corr.py @@ -23,7 +23,7 @@ def tearDown(self): def test_001_t(self): # generate a random Schmidl&Cox preamble d = np.random.normal(0.0, 1, 32) + 1j * np.random.normal(0.0, 1, 32) - s = np.zeros(64, dtype=np.complex) + s = np.zeros(64, dtype=complex) s[::2] = d sync_seq = np.fft.ifft(s) diff --git a/python/qa_sc_tagger.py b/python/qa_sc_tagger.py index 586e93f..e70513a 100755 --- a/python/qa_sc_tagger.py +++ b/python/qa_sc_tagger.py @@ -24,7 +24,7 @@ def tearDown(self): def test_001_t(self): # generate a random Schmidl&Cox preamble d = np.random.normal(0.0, 1, 32) + 1j * np.random.normal(0.0, 1, 32) - s = np.zeros(64, dtype=np.complex) + s = np.zeros(64, dtype=complex) s[::2] = d sync_seq = np.fft.ifft(s) diff --git a/python/qa_xcorr_tagger.py b/python/qa_xcorr_tagger.py index 7333b50..244d0e0 100755 --- a/python/qa_xcorr_tagger.py +++ b/python/qa_xcorr_tagger.py @@ -28,7 +28,7 @@ def tearDown(self): def test_001_t(self): # generate a random Schmidl&Cox preamble d = np.random.normal(0.0, 1, 32) + 1j * np.random.normal(0.0, 1, 32) - s = np.zeros(64, dtype=np.complex) + s = np.zeros(64, dtype=complex) s[::2] = d sync_seq = np.fft.ifft(s).astype(np.complex64) sync_seq /= np.sqrt(np.mean(sync_seq ** 2))