|
9 | 9 | import shutil |
10 | 10 | import warnings |
11 | 11 | from abc import ABC, abstractmethod |
12 | | -from collections.abc import Iterable, Sequence |
| 12 | +from collections.abc import Callable, Iterable, Sequence |
13 | 13 | from dataclasses import dataclass |
14 | 14 | from typing import ( |
15 | 15 | Any, |
16 | | - Callable, |
17 | 16 | ) |
18 | 17 |
|
19 | 18 | import numpy as np |
|
49 | 48 | import amici.petab.petab_importer |
50 | 49 | import amici.petab.simulations |
51 | 50 | from amici.petab.import_helpers import check_model |
52 | | - import amici.sim.sundials as asd |
53 | 51 | except ImportError: |
54 | 52 | amici = None |
55 | 53 | try: |
@@ -322,7 +320,11 @@ def create_objective( |
322 | 320 | # fill in dummy parameters (this is needed since some objective |
323 | 321 | # initialization e.g. checks for preeq parameters) |
324 | 322 | problem_parameters = dict( |
325 | | - zip(self.petab_problem.x_ids, self.petab_problem.x_nominal_scaled) |
| 323 | + zip( |
| 324 | + self.petab_problem.x_ids, |
| 325 | + self.petab_problem.x_nominal_scaled, |
| 326 | + strict=True, |
| 327 | + ) |
326 | 328 | ) |
327 | 329 | amici.petab.conditions.fill_in_parameters( |
328 | 330 | edatas=edatas, |
@@ -651,7 +653,7 @@ def _check_noise_formulae( |
651 | 653 | to_change = [] |
652 | 654 | # check that noise formulae are valid |
653 | 655 | for i_edata, (edata, par_map) in enumerate( |
654 | | - zip(edatas, parameter_mapping) |
| 656 | + zip(edatas, parameter_mapping, strict=True) |
655 | 657 | ): |
656 | 658 | for j_formula, noise_formula in enumerate(edata.noise_formulae): |
657 | 659 | # constant values are allowed |
@@ -763,7 +765,7 @@ def create_parameter_mapping(self): |
763 | 765 | if not overrides: |
764 | 766 | return mapping |
765 | 767 | for (_, condition), mapping_per_condition in zip( |
766 | | - simulation_conditions.iterrows(), mapping |
| 768 | + simulation_conditions.iterrows(), mapping, strict=True |
767 | 769 | ): |
768 | 770 | for override in overrides: |
769 | 771 | preeq_id = condition.get(PREEQUILIBRATION_CONDITION_ID) |
|
0 commit comments