GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deprecate np.matrix usage by bnavigator · Pull Request #486 · python-control/python-control

deprecate np.matrix usage #486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
murrayrm merged 2 commits into python-control:master from bnavigator:deprecate-matrix
Dec 30, 2020

Uh oh!

There was an error while loading. Please reload this page.

Merged

deprecate np.matrix usage #486

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
b83cc15
deprecate np.matrix usage
bnavigator Dec 29, 2020
1565097
print pytest summary for all except passing
bnavigator Dec 30, 2020
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

10 changes: 5 additions & 5 deletions 10 control/config.py
Show comments
View file
Open in desktop
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 3 setup.cfg
Show comments
View file
Open in desktop
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

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.