Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 0d3b714

Browse files
committed
Handling TypeError
1 parent 198d1da commit 0d3b714

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

code/modsim.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,10 @@ def wrap_event(event):
490490
# remove dimensions from the initial conditions.
491491
# we need this because otherwise `init` gets copied into the
492492
# results array along with its units
493+
# try:
494+
# y_0 = [magnitude(x) for x in init]
495+
# except TypeError:
496+
# y_0 = [magnitude(init)]
493497
y_0 = [magnitude(x) for x in init]
494498

495499
# run the solver

0 commit comments

Comments
 (0)