Skip to content

Commit

Permalink
Updating calls to NumPy stack to avoid generators.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit Ansmann committed Mar 6, 2020
1 parent 7cfab9a commit d702d96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_numerical.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class RandomDirectionTest(unittest.TestCase):
def test_random_direction(self):
d = 10
n = 100000
n_vectors = np.vstack(random_direction(d) for i in range(n))
n_vectors = np.vstack([random_direction(d) for i in range(n)])
average = np.average(n_vectors, axis=0)
assert_allclose( average, np.zeros(d), rtol=0, atol=0.01 )

Expand Down
2 changes: 1 addition & 1 deletion tests/test_symbolic.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_complex_expression(self):
self.assertTrue(has_function(expression,f))
self.assertEqual(
replace_function(expression,f,g),
3**g(42) + 23 - g(43,44) + g(45+a)*sin( g(g(46,47,48)+17) - g(4) + sin(g(42)) )
3**g(42) + 23 - g(43,44) + g(45+a)*sin( g(g(46,47,48)+17) - g(4) ) + sin(g(42))
)

def test_function_within_function(self):
Expand Down

0 comments on commit d702d96

Please sign in to comment.