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 df733d1 commit 58b30c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/two_Roesslers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
DDE.step_on_discontinuities()

times = np.arange(DDE.t,DDE.t+1000,0.1)
data = np.vstack(DDE.integrate(T) for T in times)
data = np.vstack([ DDE.integrate(T) for T in times ])
np.savetxt("two_roesslers.dat", data)

4 changes: 2 additions & 2 deletions tests/test_past_from_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_exp(self):
self.DDE.past_from_function(function)
self.DDE.step_on_discontinuities()
times = np.arange( self.DDE.t, self.DDE.t+1000, 10 )
result = np.vstack( self.DDE.integrate(time) for time in times )
result = np.vstack([ self.DDE.integrate(time) for time in times ])
results.append(result)

assert_allclose(results[0],results[1],atol=0.01,rtol=1e-5)
Expand All @@ -46,7 +46,7 @@ def test_polynomial(self):
self.DDE.past_from_function(function)
self.DDE.step_on_discontinuities()
times = np.arange( self.DDE.t, self.DDE.t+1000, 10 )
result = np.vstack( self.DDE.integrate(time) for time in times )
result = np.vstack([ self.DDE.integrate(time) for time in times ])
results.append(result)

assert_allclose(results[0],results[1],atol=0.01,rtol=1e-5)
Expand Down

0 comments on commit 58b30c0

Please sign in to comment.