File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 20
20
_use_numpy_matrix = True # Decide whether to use numpy.marix
21
21
22
22
def reset_defaults ():
23
- """Reset configuration values to their default values."""
23
+ """Reset package configuration values to their default values."""
24
24
global bode_dB ; bode_dB = False
25
25
global bode_deg ; bode_deg = True
26
26
global bode_Hz ; bode_Hz = False
@@ -61,6 +61,22 @@ def use_fbs_defaults():
61
61
62
62
# Decide whether to use numpy.matrix for state space operations
63
63
def use_numpy_matrix (flag = True , warn = True ):
64
+ """Turn on/off use of Numpy `matrix` class for state space operations.
65
+
66
+ Parameters
67
+ ----------
68
+
10000
flag : bool
69
+ If flag is `True` (default), use the Numpy (soon to be deprecated)
70
+ `matrix` class to represent matrices in the `~control.StateSpace`
71
+ class and functions. If flat is `False`, then matrices are represnted
72
+ by a 2D `ndarray` object.
73
+
74
+ warn : bool
75
+ If flag is `True` (default), issue a warning when turning on the use
76
+ of the Numpy `matrix` class. Set `warn` to false to omit display of
77
+ the warning message.
78
+
79
+ """
64
80
if flag and warn :
65
81
warnings .warn ("Return type numpy.matrix is soon to be deprecated." ,
66
82
stacklevel = 2 )
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ Utility functions and conversions
156
156
observable_form
157
157
pade
158
158
reachable_form
159
+ reset_defaults
159
160
sample_system
160
161
ss2tf
161
162
ssdata
@@ -166,3 +167,4 @@ Utility functions and conversions
166
167
unwrap
167
168
use_fbs_defaults
168
169
use_matlab_defaults
170
+ use_numpy_matrix
Original file line number Diff line number Diff line change @@ -209,6 +209,8 @@ Functions that can be used to set standard configurations:
209
209
210
210
.. autosummary ::
211
211
:toctree: generated/
212
-
212
+
213
+ reset_defaults
213
214
use_fbs_defaults
214
215
use_matlab_defaults
216
+ use_numpy_matrix
You can’t perform that action at this time.
0 commit comments