diff --git a/examples/cvode_with_parameters_modified.py b/examples/cvode_with_parameters_modified.py index 396b934c..d8135ca4 100644 --- a/examples/cvode_with_parameters_modified.py +++ b/examples/cvode_with_parameters_modified.py @@ -21,7 +21,7 @@ from assimulo.problem import Explicit_Problem def run_example(with_plots=True): - """ + r""" This is the same example from the Sundials package (cvsRoberts_FSA_dns.c) This simple example problem for CVode, due to Robertson, diff --git a/examples/dopri5_basic.py b/examples/dopri5_basic.py index 413d6a48..941f8499 100644 --- a/examples/dopri5_basic.py +++ b/examples/dopri5_basic.py @@ -39,7 +39,7 @@ def f(t,y): #Define an Assimulo problem exp_mod = Explicit_Problem(f, 4.0, - name = 'DOPRI5 Example: $\dot y = - y$') + name = r'DOPRI5 Example: $\dot y = - y$') exp_sim = Dopri5(exp_mod) #Create a Dopri5 solver diff --git a/examples/euler_basic.py b/examples/euler_basic.py index 40de392d..08254553 100644 --- a/examples/euler_basic.py +++ b/examples/euler_basic.py @@ -40,7 +40,7 @@ def f(t,y): #Define an Assimulo problem exp_mod = Explicit_Problem(f, 4.0, - name = 'ExplicitEuler Example: $\dot y = - y$') + name = r'ExplicitEuler Example: $\dot y = - y$') #Explicit Euler exp_sim = ExplicitEuler(exp_mod) #Create a explicit Euler solver diff --git a/examples/euler_vanderpol.py b/examples/euler_vanderpol.py index d9212f5a..71aa167c 100644 --- a/examples/euler_vanderpol.py +++ b/examples/euler_vanderpol.py @@ -80,7 +80,7 @@ def jac(t,y): import pylab as pl pl.plot(t,y[:,0], marker='o') pl.title(exp_mod.name) - pl.ylabel("State: $y_1$") + pl.ylabel(r"State: $y_1$") pl.xlabel("Time") pl.show() diff --git a/examples/ida_basic_backward.py b/examples/ida_basic_backward.py index e7698879..be292d81 100644 --- a/examples/ida_basic_backward.py +++ b/examples/ida_basic_backward.py @@ -39,7 +39,7 @@ def f(t,y,yd): #Define an Assimulo problem imp_mod = Implicit_Problem(f,t0=5, y0=0.02695, yd0=-0.02695, - name = 'IDA Example: $\dot y + y = 0$ (reverse time)') + name = r'IDA Example: $\dot y + y = 0$ (reverse time)') #Define an explicit solver imp_sim = IDA(imp_mod) #Create a IDA solver diff --git a/examples/lsodar_bouncing_ball.py b/examples/lsodar_bouncing_ball.py index 775c7603..5bc6f5f1 100644 --- a/examples/lsodar_bouncing_ball.py +++ b/examples/lsodar_bouncing_ball.py @@ -135,7 +135,7 @@ def run_example(with_plots=True): pl.subplot(221) pl.plot(t,y) pl.title('LSODAR Bouncing ball (one step mode)') - pl.ylabel('States: $y$ and $\dot y$') + pl.ylabel(r'States: $y$ and $\dot y$') pl.subplot(223) pl.plot(exp_sim.t_sol,exp_sim.h_sol) pl.title('LSODAR step size plot') diff --git a/examples/rungekutta34_basic.py b/examples/rungekutta34_basic.py index fea7749f..c8a06bb8 100644 --- a/examples/rungekutta34_basic.py +++ b/examples/rungekutta34_basic.py @@ -40,7 +40,7 @@ def f(t,y): #Define an Assimulo problem exp_mod = Explicit_Problem(f, 4.0, - name = 'RK34 Example: $\dot y = - y$') + name = r'RK34 Example: $\dot y = - y$') exp_sim = RungeKutta34(exp_mod) #Create a RungeKutta34 solver exp_sim.inith = 0.1 #Sets the initial step, default = 0.01 diff --git a/examples/rungekutta4_basic.py b/examples/rungekutta4_basic.py index cb009129..82b34a58 100644 --- a/examples/rungekutta4_basic.py +++ b/examples/rungekutta4_basic.py @@ -41,7 +41,7 @@ def f(t,y): #Define an Assimulo problem exp_mod = Explicit_Problem(f, 4.0, - name = 'RK4 Example: $\dot y = - y$') + name = r'RK4 Example: $\dot y = - y$') exp_sim = RungeKutta4(exp_mod) #Create a RungeKutta4 solver diff --git a/tests/solvers/test_euler.py b/tests/solvers/test_euler.py index 501f2e8a..a12fcc49 100644 --- a/tests/solvers/test_euler.py +++ b/tests/solvers/test_euler.py @@ -23,7 +23,7 @@ import numpy as np import scipy.sparse as sps -float_regex = "[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" +float_regex = r"[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" class Extended_Problem(Explicit_Problem): diff --git a/tests/solvers/test_odepack.py b/tests/solvers/test_odepack.py index b5037e67..427f7b74 100644 --- a/tests/solvers/test_odepack.py +++ b/tests/solvers/test_odepack.py @@ -25,7 +25,7 @@ import numpy as np import scipy.sparse as sps -float_regex = "[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" +float_regex = r"[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" class Extended_Problem(Explicit_Problem): diff --git a/tests/solvers/test_radau5.py b/tests/solvers/test_radau5.py index 5731d623..ee20cedb 100644 --- a/tests/solvers/test_radau5.py +++ b/tests/solvers/test_radau5.py @@ -28,7 +28,7 @@ import numpy as np import re -float_regex = "[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" +float_regex = r"[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" class KeyboardInterruptAux: """Auxiliary class for creating problems (both explicit and implicit) diff --git a/tests/solvers/test_rosenbrock.py b/tests/solvers/test_rosenbrock.py index f5a157ab..d65b518a 100644 --- a/tests/solvers/test_rosenbrock.py +++ b/tests/solvers/test_rosenbrock.py @@ -23,7 +23,7 @@ import numpy as np import scipy.sparse as sps -float_regex = "[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" +float_regex = r"[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" class Test_RodasODE: def setUp(self): diff --git a/tests/solvers/test_rungekutta.py b/tests/solvers/test_rungekutta.py index 0634242e..a7e8cc50 100644 --- a/tests/solvers/test_rungekutta.py +++ b/tests/solvers/test_rungekutta.py @@ -22,7 +22,7 @@ from assimulo.exception import Explicit_ODE_Exception, TimeLimitExceeded import numpy as np -float_regex = "[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" +float_regex = r"[\s]*[\d]*.[\d]*((e|E)(\+|\-)\d\d|)" class Test_Dopri5: