Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
debug noslycot solve error: don't raise but print nan
  • Loading branch information
bnavigator committed Nov 1, 2021
commit 6a8b62f6fd1f903d5446800f279569ac561b9eaa
4 changes: 3 additions & 1 deletion control/statesp.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,6 @@ def horner(self, x, warn_infinite=True):
solve(x_idx * eye(self.nstates) - self.A, self.B)) \
+ self.D
except LinAlgError as e:
Comment thread
bnavigator marked this conversation as resolved.
Outdated
print(self)
# Issue a warning messsage, for consistency with xferfcn
if warn_infinite:
warn("singular matrix in frequency response",
Expand All @@ -922,6 +921,9 @@ def horner(self, x, warn_infinite=True):
out[:, :, idx] = complex(np.nan, np.nan)
else:
out[:, :, idx] = complex(np.inf, np.nan)
if np.any(np.isnan(out)):
print(self)
print(out)

return out

Expand Down