Skip to content

Commit

Permalink
Fix string escape (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller authored Jun 27, 2024
1 parent 6f5d9ba commit 8fa3901
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/cvode_with_parameters_modified.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/dopri5_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion examples/euler_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/euler_vanderpol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion examples/ida_basic_backward.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/lsodar_bouncing_ball.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion examples/rungekutta34_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/rungekutta4_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/solvers/test_euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion tests/solvers/test_odepack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion tests/solvers/test_radau5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/solvers/test_rosenbrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/solvers/test_rungekutta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 8fa3901

Please sign in to comment.