Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf9d4a9c

Browse files
committed
deprecate np.matrix usage
1 parent51c797e commitf9d4a9c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎control/config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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 theNumpy (soon to bedeprecated)
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
"""
163163
ifflagandwarn:
164-
warnings.warn("Return type numpy.matrix issoon to bedeprecated.",
165-
stacklevel=2)
164+
warnings.warn("Return type numpy.matrix is deprecated.",
165+
stacklevel=2,category=DeprecationWarning)
166166
set_defaults('statesp',use_numpy_matrix=flag)
167167

168168
defuse_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
"""
176176
importre
177177
(major,minor,patch)= (None,None,None)# default values
@@ -189,7 +189,7 @@ def use_legacy_defaults(version):
189189
match=re.match("[vV]?0.([3-6])([a-d])",version)
190190
ifmatch: (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
194194
match=re.match("([vV]?[0-9]).([0-9])",version)
195195
ifmatch: (major,minor,patch)= \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp