Skip to content

Commit

Permalink
test: fix compat problems with scipy 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
mchitre committed Nov 25, 2024
1 parent c6c5c8b commit 70a2a9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
numpy>=1.24.0
numpy<2.0.0
scipy>=1.10.0
scipy>=1.13.0
utm>=0.7.0
pandas>=1.5.0
bokeh>=3.0.0
Expand Down
6 changes: 3 additions & 3 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_no_models(self):
os.environ["PATH"] = ""

self.assertEqual(uwapm.models(), [])

class SignalTestSuite(MyTestCase):

def test_time(self):
Expand All @@ -178,12 +178,12 @@ def test_time(self):
def test_cw(self):
self.assertArrayEqual(signal.cw(10000, 0.1, 50000), np.sin(2*np.pi*10000*np.arange(5000, dtype=np.float64)/50000), precision=6)
self.assertArrayEqual(signal.cw(10000, 0.1, 50000, complex_output=True), np.exp(2j*np.pi*10000*np.arange(5000, dtype=np.complex128)/50000), precision=6)
self.assertArrayEqual(signal.cw(10000, 0.1, 50000, ('tukey', 0.1)), sp.tukey(5000, 0.1)*np.sin(2*np.pi*10000*np.arange(5000, dtype=np.float64)/50000), precision=2)
self.assertArrayEqual(signal.cw(10000, 0.1, 50000, ('tukey', 0.1)), sp.windows.tukey(5000, 0.1)*np.sin(2*np.pi*10000*np.arange(5000, dtype=np.float64)/50000), precision=2)

def test_sweep(self):
self.assertArrayEqual(signal.sweep(5000, 10000, 0.1, 50000), sp.chirp(np.arange(5000, dtype=np.float64)/50000, 5000, 0.1, 10000, 'linear'))
self.assertArrayEqual(signal.sweep(5000, 10000, 0.1, 50000, 'hyperbolic'), sp.chirp(np.arange(5000, dtype=np.float64)/50000, 5000, 0.1, 10000, 'hyperbolic'))
self.assertArrayEqual(signal.sweep(5000, 10000, 0.1, 50000, window=('tukey', 0.1)), sp.tukey(5000, 0.1)*sp.chirp(np.arange(5000, dtype=np.float64)/50000, 5000, 0.1, 10000), precision=2)
self.assertArrayEqual(signal.sweep(5000, 10000, 0.1, 50000, window=('tukey', 0.1)), sp.windows.tukey(5000, 0.1)*sp.chirp(np.arange(5000, dtype=np.float64)/50000, 5000, 0.1, 10000), precision=2)

def test_envelope(self):
x = np.random.normal(0, 1, 1000)
Expand Down

0 comments on commit 70a2a9f

Please sign in to comment.