Skip to content

Commit

Permalink
better detection of simulation error
Browse files Browse the repository at this point in the history
  • Loading branch information
Patarimi committed Sep 8, 2023
1 parent 80952b8 commit 1c66a53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hades/simulator/em.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def parse(stream: str) -> rf.Network:
port_list_next = True
if words[0] in ports and len(words) == len(ports) + 1:
y.append([complex(w) for w in words[1:]])
if "y" in locals():
if len(y) > 0:
y_t = np.squeeze(y)
net = rf.Network(f=f, y=y_t, units="Hz")
return net
raise RuntimeError("emx exit with error: " + stream)
raise RuntimeError(stream)

0 comments on commit 1c66a53

Please sign in to comment.