deprecate np.matrix usage · python-control/python-control@f9d4a9c
@@ -144,7 +144,7 @@ def use_numpy_matrix(flag=True, warn=True):
144144 Parameters
145145 ----------
146146 flag : bool
147- If flag is `True` (default), use the Numpy (soon to be deprecated)
147+ If flag is `True` (default), use the deprecated Numpy
148148 `matrix` class to represent matrices in the `~control.StateSpace`
149149 class and functions. If flat is `False`, then matrices are
150150 represented by a 2D `ndarray` object.
@@ -161,8 +161,8 @@ class and functions. If flat is `False`, then matrices are
161161 space operations is a 2D array.
162162 """
163163if flag and warn:
164-warnings.warn("Return type numpy.matrix is soon to be deprecated.",
165-stacklevel=2)
164+warnings.warn("Return type numpy.matrix is deprecated.",
165+stacklevel=2, category=DeprecationWarning)
166166set_defaults('statesp', use_numpy_matrix=flag)
167167168168def use_legacy_defaults(version):
@@ -171,7 +171,7 @@ def use_legacy_defaults(version):
171171 Parameters
172172 ----------
173173 version : string
174- Version number of the defaults desired. Ranges from '0.1' to '0.8.4'.
174+ Version number of the defaults desired. Ranges from '0.1' to '0.8.4'.
175175 """
176176import re
177177 (major, minor, patch) = (None, None, None) # default values
@@ -189,7 +189,7 @@ def use_legacy_defaults(version):
189189match = re.match("[vV]?0.([3-6])([a-d])", version)
190190if match: (major, minor, patch) = \
191191 (0, int(match.group(1)), ord(match.group(2)) - ord('a') + 1)
192-192+193193# Abbreviated version format: vM.N or M.N
194194match = re.match("([vV]?[0-9]).([0-9])", version)
195195if match: (major, minor, patch) = \