Skip to content
Snippets Groups Projects
Commit 0ebd8cb8 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
Pipeline #131480 passed
......@@ -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)
......
......@@ -9,9 +9,9 @@ dependencies = [
"numpy",
"qtpy",
"graphviz>=0.19",
"matplotlib",
"matplotlib>=3.7",
"setuptools_scm[toml]>=6.2",
"networkx",
"networkx>=3",
"qtawesome"
]
classifiers = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment