Skip to content
Snippets Groups Projects
Commit 743eb257 authored by Florent Jaillet's avatar Florent Jaillet
Browse files

Correcting waveform.py (should improve its test coverage)

parent e31910e6
Branches
Tags
No related merge requests found
Pipeline #
......@@ -169,7 +169,8 @@ class Waveform(MadArray):
raise ValueError(errmsg.format(inputs[0].fs, inputs[1].fs))
output = output.view(Waveform)
output.fs = inputs[0].fs if isinstance(inputs[0], Waveform) else inputs[1].fs
output.fs = inputs[0].fs if isinstance(inputs[0], Waveform) \
else inputs[1].fs
return output
......@@ -771,7 +772,7 @@ class Waveform(MadArray):
def copy(self):
return Waveform(self)
# def __add__(self, other):
def __add__(self, other):
if isinstance(other, Waveform) and self.fs != other.fs:
errmsg = 'Waveforms do not have the same fs: {} and {}'
raise ValueError(errmsg.format(self.fs, other.fs))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment