Skip to content

Commit

Permalink
fix error when the setinitialcondition is a floating point # and it t…
Browse files Browse the repository at this point in the history
…ries to parse rest, needing an iterable. Now striped lowercase sting
  • Loading branch information
jcblemai committed Oct 25, 2023
1 parent 7f37e23 commit a6b8cbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flepimop/gempyor_pkg/src/gempyor/seeding_ic.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def draw_ic(self, sim_id: int, setup) -> np.ndarray:
f"Initial Conditions: Could not set compartment {comp_name} (id: {comp_idx}) in node {pl} (id: {pl_idx}). The data from the init file is {states_pl}. \n \
Use 'allow_missing_compartments' to default to 0 for compartments without initial conditions"
)
if "rest" in ic_df_compartment_val:
if "rest" in str(ic_df_compartment_val).strip().lower():
rests.append([comp_idx, pl_idx])
else:
y0[comp_idx, pl_idx] = float(ic_df_compartment_val)
Expand Down

0 comments on commit a6b8cbc

Please sign in to comment.