Switch LTI class and subclasses to use ninputs, noutputs, nstates by murrayrm · Pull Request #515 · python-control/python-control
This raises an Exception of the class PendingDeprecationWarning and never returns self.inputs.
Python 3.8.6 (default, Nov 09 2020, 12:09:06) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import control
>>> rsys = control.rss(3,3,3)
>>> ninputs = rsys.inputs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ben/src/python-control/control/lti.py", line 64, in inputs
raise PendingDeprecationWarning(
PendingDeprecationWarning: The LTI `inputs` attribute will be deprecated in a future release. Use `ninputs` instead.
>>> ninputs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'ninputs' is not defined
Additionally, either a warning filter needs to be set in order to make the warning visible to end users, or a different category than *DeprecationWarning needs to be used.
filterwarnings('module', message=".*LTI.*attribute.*deprecated", category=PendingDeprecationWarning)
Python 3.8.6 (default, Nov 09 2020, 12:09:06) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import control; rsys = control.rss(3,3,3); ninputs = rsys.inputs
<stdin>:1: PendingDeprecationWarning: The LTI `inputs` attribute will be deprecated in a future release. Use `ninputs` instead.
>>> ninputs
3