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

fix(xferfcn): cast coeffs to float before eval(repr(coeffs)) for floa… · python-control/python-control@33fc0e4 · GitHub

Commit 33fc0e4

Browse files
Петушков А.
committed
fix(xferfcn): cast coeffs to float before eval(repr(coeffs)) for float32/complex64 compatibility
1 parent 1dd5a87 commit 33fc0e4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎control/xferfcn.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,7 @@ def _tf_polynomial_to_string(coeffs, var='s'):
13791379
thestr = "0"
13801380

13811381
# Apply NumPy formatting
1382+
coeffs = np.asarray(coeffs, dtype=float)
13821383
with np.printoptions(threshold=sys.maxsize):
13831384
coeffs = eval(repr(coeffs))
13841385

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL