Skip to content
Snippets Groups Projects

Add slots to signal generators

Merged Oscar Gustafsson requested to merge slots2 into master
Files
3
@@ -90,6 +90,8 @@ class Impulse(SignalGenerator):
The delay before the signal goes to 1 for one sample.
"""
__slots__ = ("_delay",)
def __init__(self, delay: int = 0) -> None:
self._delay = delay
@@ -110,6 +112,8 @@ class Step(SignalGenerator):
The delay before the signal goes to 1.
"""
__slots__ = ("_delay",)
def __init__(self, delay: int = 0) -> None:
self._delay = delay
@@ -130,6 +134,8 @@ class Constant(SignalGenerator):
The constant.
"""
__slots__ = ("_constant",)
def __init__(self, constant: complex = 1.0) -> None:
self._constant = constant
@@ -150,6 +156,8 @@ class ZeroPad(SignalGenerator):
The data that should be padded.
"""
__slots__ = ("_data", "_len")
def __init__(self, data: Sequence[complex]) -> None:
self._data = data
self._len = len(data)
Loading