FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(mateqn): use np.finfo instead of bare finfo · python-control/python-control@c4e609e · GitHub

Commit c4e609e

Browse files
Петушков А.
committed
fix(mateqn): use np.finfo instead of bare finfo
1 parent 0af3dbf commit c4e609e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎control/mateqn.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def _warn_ill_conditioned_E(E):
6969
not measurably more accurate in that regime.
7070
"""
7171
condE = np.linalg.cond(E)
72-
if condE > 1.0 / np.sqrt(finfo(float).eps):
72+
if condE > 1.0 / np.sqrt(np.finfo(float).eps):
7373
warnings.warn(
7474
f"E is ill-conditioned (cond(E) = {condE:.2g}); the generalized "
7575
"Lyapunov solution may have reduced accuracy. The problem itself "
@@ -383,7 +383,7 @@ def dlyap(A, Q, C=None, E=None, method=None):
383383
# Solvability requires lam_A * lam_Q != 1 for all pairs of
384384
# eigenvalues (the diagonals of the triangular factors)
385385
if np.min(np.abs(np.outer(np.diag(Tq), np.diag(Ta)) - 1.)) \
386-
< finfo(float).eps * max(
386+
< np.finfo(float).eps * max(
387387
1., np.abs(np.diag(Ta)).max()
388388
* np.abs(np.diag(Tq)).max()):
389389
raise ControlArgument(

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL