From b83cc15ac7601b103fdd3ff4add45cbdd864bf9b Mon Sep 17 00:00:00 2001 From: bnavigator Date: Tue, 29 Dec 2020 22:59:06 +0100 Subject: [PATCH 1/2] deprecate np.matrix usage --- control/config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/control/config.py b/control/config.py index ad9ffb235..800fe7f26 100644 --- a/control/config.py +++ b/control/config.py @@ -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. @@ -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): @@ -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 @@ -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) = \ From 1565097733ed5c125a08c8bd5712266d280cb231 Mon Sep 17 00:00:00 2001 From: bnavigator Date: Wed, 30 Dec 2020 21:23:55 +0100 Subject: [PATCH 2/2] print pytest summary for all except passing --- setup.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 38ca3b912..227b2b97d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,6 +2,5 @@ universal=1 [tool:pytest] -filterwarnings = - ignore:.*matrix subclass:PendingDeprecationWarning +addopts = -ra pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy