Skip to content

Commit

Permalink
TST: linalg: set random seeds in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pv committed Nov 28, 2012
1 parent dae0b0b commit 0f7ae6b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scipy/linalg/tests/test_basic.py
Expand Up @@ -263,6 +263,8 @@ def test_bad_shapes(self):




class TestSolve(TestCase): class TestSolve(TestCase):
def setUp(self):
np.random.seed(1234)


def test_20Feb04_bug(self): def test_20Feb04_bug(self):
a = [[1,1],[1.0,0]] # ok a = [[1,1],[1.0,0]] # ok
Expand Down Expand Up @@ -416,6 +418,8 @@ def test_check_finite(self):




class TestInv(TestCase): class TestInv(TestCase):
def setUp(self):
np.random.seed(1234)


def test_simple(self): def test_simple(self):
a = [[1,2],[3,4]] a = [[1,2],[3,4]]
Expand Down Expand Up @@ -457,6 +461,8 @@ def test_check_finite(self):




class TestDet(TestCase): class TestDet(TestCase):
def setUp(self):
np.random.seed(1234)


def test_simple(self): def test_simple(self):
a = [[1,2],[3,4]] a = [[1,2],[3,4]]
Expand Down Expand Up @@ -501,6 +507,9 @@ def direct_lstsq(a,b,cmplx=0):
return solve(a1, b1) return solve(a1, b1)


class TestLstsq(TestCase): class TestLstsq(TestCase):
def setUp(self):
np.random.seed(1234)

def test_random_overdet_large(self): def test_random_overdet_large(self):
#bug report: Nils Wagner #bug report: Nils Wagner
n = 200 n = 200
Expand Down

0 comments on commit 0f7ae6b

Please sign in to comment.