Skip to content

Commit a359e8b

Browse files
committed
fix rounding error issue showing up in NumPy 2.3.1
1 parent ffcc2a6 commit a359e8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

control/xferfcn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ def _c2d_matched(sysC, Ts, **kwargs):
13501350
zpoles[idx] = z
13511351
pregainden[idx] = 1 - z
13521352
zgain = np.multiply.reduce(pregainnum) / np.multiply.reduce(pregainden)
1353-
gain = sysC.dcgain() / zgain
1353+
gain = sysC.dcgain() / zgain.real
13541354
sysDnum, sysDden = zpk2tf(zzeros, zpoles, gain)
13551355
return TransferFunction(sysDnum, sysDden, Ts, **kwargs)
13561356

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy