Skip to content
Snippets Groups Projects
Commit 75d98dfa authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Add slots to signal generators

parent b874af0a
No related branches found
No related tags found
1 merge request!444Add slots to signal generators
This commit is part of merge request !444. Comments created here will be created in the context of that merge request.
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment