Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions control/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def use_numpy_matrix(flag=True, warn=True):
Parameters
----------
flag : bool
If flag is `True` (default), use the Numpy (soon to be deprecated)
If flag is `True` (default), use the deprecated Numpy
`matrix` class to represent matrices in the `~control.StateSpace`
class and functions. If flat is `False`, then matrices are
represented by a 2D `ndarray` object.
Expand All @@ -161,8 +161,8 @@ class and functions. If flat is `False`, then matrices are
space operations is a 2D array.
"""
if flag and warn:
warnings.warn("Return type numpy.matrix is soon to be deprecated.",
stacklevel=2)
warnings.warn("Return type numpy.matrix is deprecated.",
stacklevel=2, category=DeprecationWarning)
set_defaults('statesp', use_numpy_matrix=flag)

def use_legacy_defaults(version):
Expand All @@ -171,7 +171,7 @@ def use_legacy_defaults(version):
Parameters
----------
version : string
Version number of the defaults desired. Ranges from '0.1' to '0.8.4'.
Version number of the defaults desired. Ranges from '0.1' to '0.8.4'.
"""
import re
(major, minor, patch) = (None, None, None) # default values
Expand All @@ -189,7 +189,7 @@ def use_legacy_defaults(version):
match = re.match("[vV]?0.([3-6])([a-d])", version)
if match: (major, minor, patch) = \
(0, int(match.group(1)), ord(match.group(2)) - ord('a') + 1)

# Abbreviated version format: vM.N or M.N
match = re.match("([vV]?[0-9]).([0-9])", version)
if match: (major, minor, patch) = \
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
universal=1

[tool:pytest]
filterwarnings =
ignore:.*matrix subclass:PendingDeprecationWarning
addopts = -ra