Fix CI errors in NumPy 2.3.1 by murrayrm · Pull Request #1163 · python-control/python-control

This PR fixes a couple of CI errors that arose in NumPy 2.3.1 and that hadn't shown up prior to this:

  • In optimal.py, there was a bug in saving old values of an array, where copy() should have been used.
  • In lti.py, there seems to be a difference in the way numpy.multiply returns values (perhaps due to rounding?) that was causing transfer functions with complex coefficients when using c2d.

Fixes for both are very small and I'll merge this quickly so that I can release 0.10.2 this weekend.