Fix CI warnings by murrayrm · Pull Request #955 · python-control/python-control

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

@murrayrm

This PR makes a bunch of small changes to remove warning messages in the GitHub actions CI runs:

  • Access scalar NumPy arrays using item() (old usage is newly deprecated in NumPy).
  • Change set_tight_layout(True) to fig.set_layout_engine('tight') (newly deprecated in Matplotlib).
  • Update unit tests using deprecated functionality to use current functionality.
  • Add warning filters for internal calls to connect (which are OK for now).
  • Avoid calling tf2zpk with zero in the numerator (SciPy generates warning).
  • Fix up some strings that had newly deprecated escape sequences (by using raw strings)
  • Turn off warnings for optimal control problems that fail to hit desired precision (but still return valid answers)

Note: it is likely that this PR will conflict with #953. We should probably merge #953 first and then rebase this PR since the changes here are pretty straightforward.

@coveralls

Coverage Status

coverage: 94.78% (-0.09%) from 94.866%
when pulling dc74493 on murrayrm:fixwarnings-23Dec2023
into eb0f3f9 on python-control:main.

slivingston

@bnavigator

@murrayrm

Looks like there were no conflicts, so going ahead and merging.

@bnavigator: FYI (and not really for this PR), I tried updating GitHub actions to use Python 3.12 but mamba caused problems, so I'm waiting until that clears. You can find the attempt here.