ltisys.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.signal` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _ltisys
  6. __all__ = [ # noqa: F822
  7. 'lti', 'dlti', 'TransferFunction', 'ZerosPolesGain', 'StateSpace',
  8. 'lsim', 'lsim2', 'impulse', 'impulse2', 'step', 'step2', 'bode',
  9. 'freqresp', 'place_poles', 'dlsim', 'dstep', 'dimpulse',
  10. 'dfreqresp', 'dbode', 's_qr', 'integrate', 'interpolate', 'linalg',
  11. 'interp1d', 'tf2zpk', 'zpk2tf', 'normalize', 'freqs',
  12. 'freqz', 'freqs_zpk', 'freqz_zpk', 'tf2ss', 'abcd_normalize',
  13. 'ss2tf', 'zpk2ss', 'ss2zpk', 'cont2discrete', 'atleast_1d',
  14. 'atleast_2d', 'squeeze', 'transpose', 'zeros_like', 'linspace',
  15. 'nan_to_num', 'LinearTimeInvariant', 'TransferFunctionContinuous',
  16. 'TransferFunctionDiscrete', 'ZerosPolesGainContinuous',
  17. 'ZerosPolesGainDiscrete', 'StateSpaceContinuous',
  18. 'StateSpaceDiscrete', 'Bunch'
  19. ]
  20. def __dir__():
  21. return __all__
  22. def __getattr__(name):
  23. if name not in __all__:
  24. raise AttributeError(
  25. "scipy.signal.ltisys is deprecated and has no attribute "
  26. f"{name}. Try looking in scipy.signal instead.")
  27. warnings.warn(f"Please use `{name}` from the `scipy.signal` namespace, "
  28. "the `scipy.signal.ltisys` namespace is deprecated.",
  29. category=DeprecationWarning, stacklevel=2)
  30. return getattr(_ltisys, name)