Skip to content

Commit 3d5414b

Browse files
committed
#281 Switch from OrderedDict to dict
1 parent ec8ea9e commit 3d5414b

7 files changed

+9
-13
lines changed

chaste_codegen/_command_line_script.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
######################################################################
44
import argparse
55
import os
6-
from collections import OrderedDict
76

87
import chaste_codegen as cg
98
from chaste_codegen import LOGGER, CodegenError, load_model_with_conversions
@@ -17,7 +16,7 @@
1716

1817
# pass --<command_line_tag> to select this model type
1918

20-
TRANSLATORS = OrderedDict(
19+
TRANSLATORS = dict(
2120
[('normal', (cg.NormalChasteModel, 'FromCellML', '', True, '')),
2221
('cvode', (cg.CvodeChasteModel, 'FromCellMLCvode', 'Cvode', True, '')),
2322
('cvode-data-clamp', (cg.CvodeChasteModel, 'FromCellMLCvodeDataClamp', 'CvodeDataClamp', True, '')),
@@ -29,7 +28,7 @@
2928
' in mastrcriptRT with added injection current(i_inj)')),
3029
('rush-larsen-c', (cg.RushLarsenC, '', '', False, ' in C with added injection current(i_inj)'))])
3130

32-
TRANSLATORS_OPT = OrderedDict(
31+
TRANSLATORS_OPT = dict(
3332
[('normal', (cg.OptChasteModel, 'FromCellMLOpt', 'Opt', True, '')),
3433
('cvode', (cg.OptCvodeChasteModel, 'FromCellMLCvodeOpt', 'CvodeOpt', True, '')),
3534
('cvode-data-clamp', (cg.OptCvodeChasteModel, 'FromCellMLCvodeDataClampOpt', 'CvodeDataClampOpt', True, '')),

chaste_codegen/_lookup_tables.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import collections
2-
31
from cellmlmanip.model import Quantity, Variable
42
from sympy import (
53
Piecewise,
@@ -71,7 +69,7 @@ def __init__(self, model, lookup_params=DEFAULT_LOOKUP_PARAMETERS):
7169
'lookup_epxrs': []} for param in lookup_params)
7270
self._model = model
7371
self._lookup_variables = set()
74-
self._lookup_table_expr = collections.OrderedDict()
72+
self._lookup_table_expr = dict()
7573
self._lookup_params_processed, self._lookup_params_printed = False, False
7674

7775
self._method_printed = None

chaste_codegen/data/tests/test_jacobian_equations_2.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chaste_codegen/data/tests/test_jacobian_equations_2.txt_python36

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chaste_codegen/data/tests/test_jacobian_matrix_2.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chaste_codegen/data/tests/test_jacobian_matrix_2.txt_python36

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chaste_codegen/tests/test_jacobian.py

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)