File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020_use_numpy_matrix = True # Decide whether to use numpy.marix
2121
2222def reset_defaults ():
23- """Reset configuration values to their default values."""
23+ """Reset package configuration values to their default values."""
2424 global bode_dB ; bode_dB = False
2525 global bode_deg ; bode_deg = True
2626 global bode_Hz ; bode_Hz = False
@@ -61,6 +61,22 @@ def use_fbs_defaults():
6161
6262# Decide whether to use numpy.matrix for state space operations
6363def 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+ 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+ """
6480 if flag and warn :
6581 warnings .warn ("Return type numpy.matrix is soon to be deprecated." ,
6682 stacklevel = 2 )
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ Utility functions and conversions
156156 observable_form
157157 pade
158158 reachable_form
159+ reset_defaults
159160 sample_system
160161 ss2tf
161162 ssdata
@@ -166,3 +167,4 @@ Utility functions and conversions
166167 unwrap
167168 use_fbs_defaults
168169 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:
209209
210210.. autosummary ::
211211 :toctree: generated/
212-
212+
213+ reset_defaults
213214 use_fbs_defaults
214215 use_matlab_defaults
216+ use_numpy_matrix
You can’t perform that action at this time.
0 commit comments