From cfe878b8836ad195d70c753c0557f3bc888f096d Mon Sep 17 00:00:00 2001 From: Michael Clerx Date: Wed, 31 Oct 2018 19:10:06 +0000 Subject: [PATCH] Fix to noise test for older numpy. --- pints/noise.py | 2 +- pints/tests/test_noise.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pints/noise.py b/pints/noise.py index fc0a8487e..ed5398d73 100644 --- a/pints/noise.py +++ b/pints/noise.py @@ -29,8 +29,8 @@ def independent(sigma, shape): noisy_values = values + noise.independent(5, values.shape) """ - # Don't test sigma/shape: handled by numpy for higher-dimensions etc.! + # Don't test sigma/shape: handled by numpy for higher-dimensions etc.! return np.random.normal(0, sigma, shape) diff --git a/pints/tests/test_noise.py b/pints/tests/test_noise.py index 5ac777c0c..949c01e65 100755 --- a/pints/tests/test_noise.py +++ b/pints/tests/test_noise.py @@ -41,7 +41,7 @@ def test_independent_noise(self): self.assertRaises(ValueError, pn.independent, -1, clean.shape) # Shape must be a nice shape (handled by numpy) - self.assertRaises(TypeError, pn.independent, 0, 'hello') + self.assertRaises(TypeError, pn.independent, 1, 'hello') def test_ar1(self):